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

Unified Diff: background.js

Issue 6324527734718464: Issue 424 - Anti-adblock filterlist disabled on extension update (Platform) (Closed)
Patch Set: Created May 5, 2014, 3 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
@@ -220,14 +220,17 @@
addAcceptable = false;
}
- // Add "anti-adblock messages" subscription
- var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl);
- if (subscription)
+ // Add "anti-adblock messages" subscription for new users and users updating from old ABP versions
+ if (!prevVersion || parseFloat(prevVersion) < 1.8)
Wladimir Palant 2014/05/05 15:23:15 Please use Services.vc.compare() here as well.
{
- subscription.disabled = true;
- FilterStorage.addSubscription(subscription);
- if (subscription instanceof DownloadableSubscription && !subscription.lastDownload)
- Synchronizer.execute(subscription);
+ var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl);
+ if (subscription)
Wladimir Palant 2014/05/05 15:23:15 As with the other review, this should be: if (sub
+ {
+ subscription.disabled = true;
+ FilterStorage.addSubscription(subscription);
+ if (subscription instanceof DownloadableSubscription && !subscription.lastDownload)
+ Synchronizer.execute(subscription);
+ }
}
if (!addSubscription && !addAcceptable)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld