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

Unified Diff: lib/antiadblockInit.js

Issue 5501516697829376: Issue 1161 - Anti-adblock notifications were triggered on similar domains (Closed)
Patch Set: Created July 29, 2014, 9:59 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/antiadblockInit.js
===================================================================
--- a/lib/antiadblockInit.js
+++ b/lib/antiadblockInit.js
@@ -48,8 +48,8 @@
for (let filter of subscription.filters)
if (filter instanceof ActiveFilter)
for (let domain in filter.domains)
- if (domain && urlFilters.indexOf(domain) == -1)
- urlFilters.push(domain);
+ if (domain && filter.domains[domain] && urlFilters.indexOf(domain) == -1)
+ urlFilters.push("||" + domain + "^");
notification.urlFilters = urlFilters;
Notification.addNotification(notification);
Notification.addQuestionListener(notification.id, notificationListener);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld