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

Unified Diff: lib/rules.js

Issue 8382011: Applied changes from emailed code review (Closed)
Patch Set: Created Sept. 18, 2012, 2:06 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
Index: lib/rules.js
===================================================================
--- a/lib/rules.js
+++ b/lib/rules.js
@@ -150,6 +150,13 @@
else
domain = domain.replace(searchString, replacement);
}
+
+ // Apply user's whitelist
+ let whitelist = Prefs.whitelist;
+ if (whitelist.hasOwnProperty(domain) || /^www\./.test(domain) && whitelist.hasOwnProperty(domain.substr(4)))
+ {
+ return domain;
+ }
Wladimir Palant 2012/09/21 14:40:25 That's not what should be done with the whitelist.
// Now apply our rules on the domain name
for (let i = 0, l = rules.expressions.length; i < l; i++)

Powered by Google App Engine
This is Rietveld