Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterComposer.js

Issue 29570614: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Fix indentation Created Oct. 9, 2017, 3:50 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/devtools.js ('k') | lib/filterValidation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterComposer.js
===================================================================
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -162,17 +162,17 @@
filters.push(docDomain.replace(/^www\./, "") + "##" + selector);
}
}
return {filters, selectors};
}
let contextMenuItem = {
- title: chrome.i18n.getMessage("block_element"),
+ title: browser.i18n.getMessage("block_element"),
contexts: ["image", "video", "audio"],
onclick(page)
{
page.sendMessage({type: "composer.content.contextMenuClicked"});
}
};
function updateContextMenu(page, filter)
@@ -190,17 +190,17 @@
page.contextMenus.create(contextMenuItem);
}
}
FilterNotifier.on("page.WhitelistingStateRevalidate", updateContextMenu);
Prefs.on("shouldShowBlockElementMenu", () =>
{
- chrome.tabs.query({}, tabs =>
+ browser.tabs.query({}, tabs =>
{
for (let tab of tabs)
updateContextMenu(new ext.Page(tab));
});
});
port.on("composer.isPageReady", (message, sender) =>
{
« no previous file with comments | « lib/devtools.js ('k') | lib/filterValidation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld