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

Unified Diff: lib/cssInjection.js

Issue 29570614: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Update buildtools dependency Created Oct. 16, 2017, 12:10 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/csp.js ('k') | lib/devtools.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/cssInjection.js
===================================================================
--- a/lib/cssInjection.js
+++ b/lib/cssInjection.js
@@ -22,22 +22,22 @@
const {RegExpFilter} = require("filterClasses");
const {ElemHide} = require("elemHide");
const {ElemHideEmulation} = require("elemHideEmulation");
const {checkWhitelisted} = require("whitelisting");
const {extractHostFromFrame} = require("url");
const {port} = require("messaging");
const devtools = require("devtools");
-const userStyleSheetsSupported = "extensionTypes" in chrome &&
- "CSSOrigin" in chrome.extensionTypes;
+const userStyleSheetsSupported = "extensionTypes" in browser &&
+ "CSSOrigin" in browser.extensionTypes;
function hideElements(tabId, frameId, selectors)
{
- chrome.tabs.insertCSS(tabId, {
+ browser.tabs.insertCSS(tabId, {
code: selectors.join(", ") + "{display: none !important;}",
cssOrigin: "user",
frameId,
matchAboutBlank: true,
runAt: "document_start"
});
}
« no previous file with comments | « lib/csp.js ('k') | lib/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld