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: Applied remaining changes Created Sept. 26, 2012, 9:02 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
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;
+ }
// 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