| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 * @param {Boolean} manual true for a manually started download (should not t
rigger fallback requests) | 81 * @param {Boolean} manual true for a manually started download (should not t
rigger fallback requests) |
| 82 */ | 82 */ |
| 83 execute: function(subscription, manual) | 83 execute: function(subscription, manual) |
| 84 { | 84 { |
| 85 downloader.download(this._getDownloadable(subscription, manual)); | 85 downloader.download(this._getDownloadable(subscription, manual)); |
| 86 }, | 86 }, |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * Yields Downloadable instances for all subscriptions that can be downloaded. | 89 * Yields Downloadable instances for all subscriptions that can be downloaded. |
| 90 */ | 90 */ |
| 91 _getDownloadables: function() | 91 _getDownloadables: function*() |
| 92 { | 92 { |
| 93 if (!Prefs.subscriptions_autoupdate) | 93 if (!Prefs.subscriptions_autoupdate) |
| 94 return; | 94 return; |
| 95 | 95 |
| 96 for (let subscription of FilterStorage.subscriptions) | 96 for (let subscription of FilterStorage.subscriptions) |
| 97 { | 97 { |
| 98 if (subscription instanceof DownloadableSubscription) | 98 if (subscription instanceof DownloadableSubscription) |
| 99 yield this._getDownloadable(subscription, false); | 99 yield this._getDownloadable(subscription, false); |
| 100 } | 100 } |
| 101 }, | 101 }, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 let data = "[Adblock]\n" + subscription.filters.map((f) => f.text).j
oin("\n"); | 311 let data = "[Adblock]\n" + subscription.filters.map((f) => f.text).j
oin("\n"); |
| 312 redirectCallback("data:text/plain," + encodeURIComponent(data)); | 312 redirectCallback("data:text/plain," + encodeURIComponent(data)); |
| 313 } | 313 } |
| 314 }, false); | 314 }, false); |
| 315 request.send(null); | 315 request.send(null); |
| 316 } | 316 } |
| 317 } | 317 } |
| 318 }, | 318 }, |
| 319 }; | 319 }; |
| 320 Synchronizer.init(); | 320 Synchronizer.init(); |
| OLD | NEW |