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

Unified Diff: lib/elemHideFF.js

Issue 29362064: #4624 - Element hiding rules should not apply on whitelisted schemes (chrome://, file:/// etc.) (Closed) Base URL: https://hg.adblockplus.org/adblockplus
Patch Set: Created Nov. 9, 2016, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHideFF.js
===================================================================
--- a/lib/elemHideFF.js
+++ b/lib/elemHideFF.js
@@ -52,17 +52,17 @@ port.on("getUnconditionalSelectors", ()
port.on("getSelectorsForDomain", ([domain, specificOnly]) =>
{
let type = specificOnly ? ElemHide.SPECIFIC_ONLY : ElemHide.NO_UNCONDITIONAL;
return ElemHide.getSelectorsForDomain(domain, type, true);
});
port.on("elemhideEnabled", ({frames, isPrivate}) =>
{
- if (!Prefs.enabled)
+ if (!Prefs.enabled || !Policy.isBlockableScheme(frames[0].location))
return {enabled: false};
let hit = Policy.isFrameWhitelisted(frames, true);
if (hit)
{
let [frameIndex, contentType, docDomain, thirdParty, location, filter] = hit;
if (!isPrivate)
FilterStorage.increaseHitCount(filter);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld