From 5ca27505ebc742d232f3a83f64237b967167335b Mon Sep 17 00:00:00 2001 From: kkapsner Date: Sun, 23 Sep 2018 12:33:23 +0200 Subject: [PATCH] Messages were not passed to tabs. --- lib/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index 5c0b389..4868486 100644 --- a/lib/main.js +++ b/lib/main.js @@ -42,7 +42,11 @@ } } notice("pass the message to the tabs"); - browser.tabs.sendMessage(data); + browser.tabs.query({}).then(function(tabs){ + tabs.forEach(function(tab){ + browser.tabs.sendMessage(tab.id, data); + }); + }); }); message("register port listener");