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: Updated adblockplustests dependency Created Oct. 5, 2015, 9:52 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 | dependencies » ('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 cb75d32e61ed093b382d7d62604595c0379a3dc5..0b75d1e17d6690ec27c2d4fccb9e03578a722c5b 100644
--- a/background.js
+++ b/background.js
@@ -305,7 +305,10 @@ ext.onMessage.addListener(function (msg, sender, sendResponse)
RegExpFilter.typeMap.DOCUMENT | RegExpFilter.typeMap.ELEMHIDE))
{
var noStyleRules = false;
+ var specificOnly = isFrameWhitelisted(sender.page, sender.frame,
+ RegExpFilter.typeMap.GENERICHIDE);
var host = extractHostFromFrame(sender.frame);
+
for (var i = 0; i < noStyleRulesHosts.length; i++)
{
var noStyleHost = noStyleRulesHosts[i];
@@ -315,7 +318,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 | dependencies » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld