Index: lib/filterComposer.js |
=================================================================== |
--- a/lib/filterComposer.js |
+++ b/lib/filterComposer.js |
@@ -179,31 +179,36 @@ |
page.contextMenus.remove(contextMenuItem); |
if (typeof filter == "undefined") |
filter = checkWhitelisted(page); |
if (!filter && Prefs.shouldShowBlockElementMenu && readyPages.has(page)) |
page.contextMenus.create(contextMenuItem); |
} |
-FilterNotifier.on("page.WhitelistingStateRevalidate", updateContextMenu); |
- |
-Prefs.on("shouldShowBlockElementMenu", () => |
+if (chrome.contextMenus) |
Manish Jethani
2017/08/10 07:40:05
Again, I've only wrapped this code in "if (chrome.
|
{ |
- ext.pages.query({}, pages => |
+ FilterNotifier.on("page.WhitelistingStateRevalidate", updateContextMenu); |
+ |
+ Prefs.on("shouldShowBlockElementMenu", () => |
{ |
- for (let page of pages) |
- updateContextMenu(page); |
+ ext.pages.query({}, pages => |
+ { |
+ for (let page of pages) |
+ updateContextMenu(page); |
+ }); |
}); |
-}); |
+} |
port.on("composer.ready", (message, sender) => |
{ |
readyPages.set(sender.page, null); |
- updateContextMenu(sender.page); |
+ |
+ if (chrome.contextMenus) |
+ updateContextMenu(sender.page); |
}); |
port.on("composer.openDialog", (message, sender) => |
{ |
return new Promise(resolve => |
{ |
ext.windows.create({ |
url: ext.getURL("composer.html"), |