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

Unified Diff: lib/whitelisting.js

Issue 29570614: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Promisify Created Oct. 11, 2017, 3:22 a.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/utils.js ('k') | metadata.chrome » ('j') | polyfill.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/whitelisting.js
===================================================================
--- a/lib/whitelisting.js
+++ b/lib/whitelisting.js
@@ -128,17 +128,17 @@
FilterNotifier.emit(
"page.WhitelistingStateRevalidate",
page, checkWhitelisted(page)
);
}
FilterNotifier.on("filter.behaviorChanged", () =>
{
- chrome.tabs.query({}, tabs =>
+ browser.tabs.query({}, tabs =>
{
for (let tab of tabs)
revalidateWhitelistingState(new ext.Page(tab));
});
});
ext.pages.onLoading.addListener(revalidateWhitelistingState);
@@ -216,19 +216,19 @@
{
recordKey(key, page, url);
break;
}
}
}
}
-if (typeof chrome == "object")
+if (typeof browser == "object")
{
- chrome.webRequest.onHeadersReceived.addListener(
+ browser.webRequest.onHeadersReceived.addListener(
onHeadersReceived,
{
urls: ["http://*/*", "https://*/*"],
types: ["main_frame", "sub_frame"]
},
["responseHeaders"]
);
}
« no previous file with comments | « lib/utils.js ('k') | metadata.chrome » ('j') | polyfill.js » ('J')

Powered by Google App Engine
This is Rietveld