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: Created March 10, 2016, 3:49 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
@@ -192,6 +192,19 @@
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)
kzar 2016/03/10 16:20:24 Nit: Mind wrapping this long line?
Sebastian Noack 2016/03/11 15:41:01 Done.
+ 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