| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 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 | 223 // Add "anti-adblock messages" subscription for new users and users updating f rom old ABP versions |
| 224 var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); | 224 if (!prevVersion || parseFloat(prevVersion) < 1.8) |
|
Wladimir Palant
2014/05/05 15:23:15
Please use Services.vc.compare() here as well.
| |
| 225 if (subscription) | |
| 226 { | 225 { |
| 227 subscription.disabled = true; | 226 var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); |
| 228 FilterStorage.addSubscription(subscription); | 227 if (subscription) |
|
Wladimir Palant
2014/05/05 15:23:15
As with the other review, this should be:
if (sub
| |
| 229 if (subscription instanceof DownloadableSubscription && !subscription.lastDo wnload) | 228 { |
| 230 Synchronizer.execute(subscription); | 229 subscription.disabled = true; |
| 230 FilterStorage.addSubscription(subscription); | |
| 231 if (subscription instanceof DownloadableSubscription && !subscription.last Download) | |
| 232 Synchronizer.execute(subscription); | |
| 233 } | |
| 231 } | 234 } |
| 232 | 235 |
| 233 if (!addSubscription && !addAcceptable) | 236 if (!addSubscription && !addAcceptable) |
| 234 return; | 237 return; |
| 235 | 238 |
| 236 function notifyUser() | 239 function notifyUser() |
| 237 { | 240 { |
| 238 ext.pages.open(ext.getURL("firstRun.html")); | 241 ext.pages.open(ext.getURL("firstRun.html")); |
| 239 } | 242 } |
| 240 | 243 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 595 page.sendMessage({type: "clickhide-deactivate"}); | 598 page.sendMessage({type: "clickhide-deactivate"}); |
| 596 refreshIconAndContextMenu(page); | 599 refreshIconAndContextMenu(page); |
| 597 }); | 600 }); |
| 598 | 601 |
| 599 setTimeout(function() | 602 setTimeout(function() |
| 600 { | 603 { |
| 601 var notificationToShow = Notification.getNextToShow(); | 604 var notificationToShow = Notification.getNextToShow(); |
| 602 if (notificationToShow) | 605 if (notificationToShow) |
| 603 showNotification(notificationToShow); | 606 showNotification(notificationToShow); |
| 604 }, 3 * 60 * 1000); | 607 }, 3 * 60 * 1000); |
| OLD | NEW |