summaryrefslogtreecommitdiff
path: root/src/bg/main.js
diff options
context:
space:
mode:
authorhackademix2018-08-22 16:34:16 +0200
committerhackademix2018-08-22 16:34:16 +0200
commit075a5ad0e0f9b4f9af614194d9c8d21d0ed45184 (patch)
treecc341040d0515e54ec8466dec8d3e32c381f1457 /src/bg/main.js
parent48c04726b8d2da0023abd0ccef3e2d09511bea47 (diff)
downloadnoscript-075a5ad0e0f9b4f9af614194d9c8d21d0ed45184.tar.gz
noscript-075a5ad0e0f9b4f9af614194d9c8d21d0ed45184.tar.xz
noscript-075a5ad0e0f9b4f9af614194d9c8d21d0ed45184.zip
More coherent wrapper around the webex messaging API.
Diffstat (limited to 'src/bg/main.js')
-rw-r--r--src/bg/main.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bg/main.js b/src/bg/main.js
index 3882191..47d28a3 100644
--- a/src/bg/main.js
+++ b/src/bg/main.js
@@ -118,8 +118,7 @@
let policy = ns.policy.dry(true);
let seen = tabId !== -1 ? await ns.collectSeen(tabId) : null;
let xssUserChoices = await XSS.getUserChoices();
- browser.runtime.sendMessage({
- type: "settings",
+ await Messages.send("settings", {
policy,
seen,
xssUserChoices,
@@ -228,11 +227,7 @@
async collectSeen(tabId) {
try {
- let seen = Array.from(await browser.tabs.sendMessage(tabId, {
- type: "collect"
- }, {
- frameId: 0
- }));
+ let seen = Array.from(await Messages.send("collect", {}, {tabId, frameId: 0}));
debug("Collected seen", seen);
return seen;
} catch (e) {