From 48dd67697722868fac6f66d3f7fd087f6feef106 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 24 Jan 2018 23:26:09 +0100 Subject: [PATCH] fixed command --- js/lib/Comms.js | 6 +++--- js/uw-bg.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/lib/Comms.js b/js/lib/Comms.js index 8a477bf..d6eec1e 100644 --- a/js/lib/Comms.js +++ b/js/lib/Comms.js @@ -116,9 +116,9 @@ var _com_sendToEachFrame = async function(message) { promises.push(browser.tabs.sendMessage(tabs[0].id, message, {frameId: frame.frameId})); } - // počakajmo, da so obljube izpolnjene + // počakajmo, da so obljube izpolnjene. // wait for all promises to be kept - var responses = Promise.all(promises); + var responses = await Promise.all(promises); if(Debug.debug) console.log("[Comms::_com_sendToEveryFrame] we received responses from all frames", responses); @@ -127,7 +127,7 @@ var _com_sendToEachFrame = async function(message) { } catch(e){ console.log("[Comms::_com_sendToEveryFrame] something went wrong when getting frames. this is error:", e); - return null; + return Promise.reject(); } } diff --git a/js/uw-bg.js b/js/uw-bg.js index d85bb12..2925918 100644 --- a/js/uw-bg.js +++ b/js/uw-bg.js @@ -21,7 +21,7 @@ async function _uwbg_onTabSwitched(activeInfo){ var tabId = activeInfo.tabId; // just for readability - Comms.sendToEach({"cmd":"has-video"}); + Comms.sendToEach({"cmd":"has-videos"}); } async function _uwbg_rcvmsg(message){