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

Unified Diff: background.js

Issue 29338118: Issue 3772 - Bring back anti-adblock warning removal subscription (Closed)
Patch Set: Wrapped long lines Created March 11, 2016, 3:40 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: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -185,13 +185,28 @@
{
subscription.title = "Allow non-intrusive advertising";
FilterStorage.addSubscription(subscription);
- if (subscription instanceof DownloadableSubscription && !subscription.lastDownload)
+ if (subscription instanceof DownloadableSubscription &&
+ !subscription.lastDownload)
Synchronizer.execute(subscription);
}
else
addAcceptable = false;
}
+ // Add "anti-adblock messages" subscription for new users
+ if (!prevVersion)
+ {
+ var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl);
+ if (subscription && !(subscription.url in FilterStorage.knownSubscriptions))
+ {
+ subscription.disabled = true;
+ FilterStorage.addSubscription(subscription);
+ if (subscription instanceof DownloadableSubscription &&
+ !subscription.lastDownload)
+ Synchronizer.execute(subscription);
+ }
+ }
+
if (!addSubscription && !addAcceptable)
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld