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

Unified Diff: lib/elemHideFF.js

Issue 29347299: Issue 4230 - Don't disable element hiding if a generichide exception rule is present (Closed)
Patch Set: Created July 6, 2016, 1:56 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 | 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
@@ -45,19 +45,22 @@ port.on("elemhideEnabled", ({frames, isP
{
if (!Prefs.enabled)
return {enabled: false};
let hit = Policy.isFrameWhitelisted(frames, true);
if (hit)
{
let [frameIndex, contentType, docDomain, thirdParty, location, filter] = hit;
- if (!isPrivate)
- FilterStorage.increaseHitCount(filter);
- return {
- enabled: false,
- contentType, docDomain, thirdParty, location,
- filter: filter.text, filterType: filter.type
- };
+ if (contentType != "GENERICHIDE")
+ {
+ if (!isPrivate)
+ FilterStorage.increaseHitCount(filter);
+ return {
+ enabled: false,
+ contentType, docDomain, thirdParty, location,
+ filter: filter.text, filterType: filter.type
+ };
+ }
}
- else
- return {enabled: true};
+
+ return {enabled: true};
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld