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

Unified Diff: include.preload.js

Issue 29545645: Issue 5695 - Use tabs.insertCSS if extensionTypes.CSSOrigin exists (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Always pass selectors if trace or inject is true Created Sept. 19, 2017, 5:44 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 | « no previous file | lib/cssInjection.js » ('j') | lib/cssInjection.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -436,17 +436,17 @@
).join(", ");
this.style.sheet.insertRule(selector + "{display: none !important;}",
this.style.sheet.cssRules.length);
}
},
addSelectors(selectors, filters)
{
- if (!selectors || selectors.length == 0)
+ if (selectors.length == 0)
return;
if (this.inject)
{
// Insert the style rules inline if we have been instructed by the
// background page to do so. This is usually the case, except on platforms
// that do support user stylesheets via the chrome.tabs.insertCSS API
// (Firefox 53 onwards for now and possibly Chrome in the near future).
« no previous file with comments | « no previous file | lib/cssInjection.js » ('j') | lib/cssInjection.js » ('J')

Powered by Google App Engine
This is Rietveld