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

Unified Diff: lib/elemHide.js

Issue 5434053851348992: Issue 1282 - Let user-defined filters override filter lists (Closed)
Patch Set: Created Dec. 9, 2014, 1:12 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 | lib/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHide.js
===================================================================
--- a/lib/elemHide.js
+++ b/lib/elemHide.js
@@ -182,8 +182,11 @@
let list = exceptions[filter.selector];
for (let i = list.length - 1; i >= 0; i--)
- if (list[i].isActiveOnDomain(docDomain))
- return list[i];
+ {
+ let exception = list[i];
+ if (exception.isActiveOnDomain(docDomain) && (!filter.isUserDefined || exception.isUserDefined))
+ return exception;
+ }
return null;
},
« no previous file with comments | « no previous file | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld