fixed command

This commit is contained in:
Tamius Han 2018-01-24 23:26:09 +01:00
parent 551bee1724
commit 48dd676977
2 changed files with 4 additions and 4 deletions

View File

@ -116,9 +116,9 @@ var _com_sendToEachFrame = async function(message) {
promises.push(browser.tabs.sendMessage(tabs[0].id, message, {frameId: frame.frameId})); 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 // wait for all promises to be kept
var responses = Promise.all(promises); var responses = await Promise.all(promises);
if(Debug.debug) if(Debug.debug)
console.log("[Comms::_com_sendToEveryFrame] we received responses from all frames", responses); console.log("[Comms::_com_sendToEveryFrame] we received responses from all frames", responses);
@ -127,7 +127,7 @@ var _com_sendToEachFrame = async function(message) {
} }
catch(e){ catch(e){
console.log("[Comms::_com_sendToEveryFrame] something went wrong when getting frames. this is error:", e); console.log("[Comms::_com_sendToEveryFrame] something went wrong when getting frames. this is error:", e);
return null; return Promise.reject();
} }
} }

View File

@ -21,7 +21,7 @@ async function _uwbg_onTabSwitched(activeInfo){
var tabId = activeInfo.tabId; // just for readability var tabId = activeInfo.tabId; // just for readability
Comms.sendToEach({"cmd":"has-video"}); Comms.sendToEach({"cmd":"has-videos"});
} }
async function _uwbg_rcvmsg(message){ async function _uwbg_rcvmsg(message){