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

Unified Diff: background.js

Issue 5138680696012800: Issue 616 - Enforce $generichide and $genericblock in Chrome (Closed)
Patch Set: Rebased. Created March 12, 2015, 8:35 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 | « no previous file | popupBlocker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
diff --git a/background.js b/background.js
index c076d42002862716e9692979eca72b140adc8ec4..a792f0be7324fadc70e1b774217e3d4a7f3c1b1f 100644
--- a/background.js
+++ b/background.js
@@ -467,7 +467,9 @@ ext.onMessage.addListener(function (msg, sender, sendResponse)
!isFrameWhitelisted(sender.page, sender.frame, "ELEMHIDE"))
{
var noStyleRules = false;
+ var specificOnly = isFrameWhitelisted(sender.page, sender.frame, "GENERICHIDE");
var host = extractHostFromFrame(sender.frame);
+
for (var i = 0; i < noStyleRulesHosts.length; i++)
{
var noStyleHost = noStyleRulesHosts[i];
@@ -477,7 +479,7 @@ ext.onMessage.addListener(function (msg, sender, sendResponse)
noStyleRules = true;
}
}
- selectors = ElemHide.getSelectorsForDomain(host, false);
+ selectors = ElemHide.getSelectorsForDomain(host, specificOnly);
if (noStyleRules)
{
selectors = selectors.filter(function(s)
« no previous file with comments | « no previous file | popupBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld