Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 { | 213 { |
214 subscription.title = "Allow non-intrusive advertising"; | 214 subscription.title = "Allow non-intrusive advertising"; |
215 FilterStorage.addSubscription(subscription); | 215 FilterStorage.addSubscription(subscription); |
216 if (subscription instanceof DownloadableSubscription && !subscription.last Download) | 216 if (subscription instanceof DownloadableSubscription && !subscription.last Download) |
217 Synchronizer.execute(subscription); | 217 Synchronizer.execute(subscription); |
218 } | 218 } |
219 else | 219 else |
220 addAcceptable = false; | 220 addAcceptable = false; |
221 } | 221 } |
222 | 222 |
223 // Add "anti-adblock messages" subscription on first run | 223 // Add "anti-adblock messages" subscription for new users and users updating f rom old ABP versions |
224 if (!prevVersion) | 224 if (!prevVersion || parseFloat(prevVersion) < 1.8) |
Wladimir Palant
2014/05/05 15:23:15
Please use Services.vc.compare() here as well.
| |
225 { | 225 { |
226 var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); | 226 var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); |
227 if (subscription) | 227 if (subscription) |
Wladimir Palant
2014/05/05 15:23:15
As with the other review, this should be:
if (sub
| |
228 { | 228 { |
229 subscription.disabled = true; | 229 subscription.disabled = true; |
230 FilterStorage.addSubscription(subscription); | 230 FilterStorage.addSubscription(subscription); |
231 if (subscription instanceof DownloadableSubscription && !subscription.last Download) | 231 if (subscription instanceof DownloadableSubscription && !subscription.last Download) |
232 Synchronizer.execute(subscription); | 232 Synchronizer.execute(subscription); |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 if (!addSubscription && !addAcceptable) | 236 if (!addSubscription && !addAcceptable) |
237 return; | 237 return; |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
598 page.sendMessage({type: "clickhide-deactivate"}); | 598 page.sendMessage({type: "clickhide-deactivate"}); |
599 refreshIconAndContextMenu(page); | 599 refreshIconAndContextMenu(page); |
600 }); | 600 }); |
601 | 601 |
602 setTimeout(function() | 602 setTimeout(function() |
603 { | 603 { |
604 var notificationToShow = Notification.getNextToShow(); | 604 var notificationToShow = Notification.getNextToShow(); |
605 if (notificationToShow) | 605 if (notificationToShow) |
606 showNotification(notificationToShow); | 606 showNotification(notificationToShow); |
607 }, 3 * 60 * 1000); | 607 }, 3 * 60 * 1000); |
LEFT | RIGHT |