| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 }); | 87 }); |
| 88 | 88 |
| 89 downloader.onExpirationChange = this._onExpirationChange.bind(this); | 89 downloader.onExpirationChange = this._onExpirationChange.bind(this); |
| 90 downloader.onDownloadSuccess = this._onDownloadSuccess.bind(this); | 90 downloader.onDownloadSuccess = this._onDownloadSuccess.bind(this); |
| 91 downloader.onDownloadError = this._onDownloadError.bind(this); | 91 downloader.onDownloadError = this._onDownloadError.bind(this); |
| 92 }, | 92 }, |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * Yields a Downloadable instances for the notifications download. | 95 * Yields a Downloadable instances for the notifications download. |
| 96 */ | 96 */ |
| 97 _getDownloadables: function() | 97 _getDownloadables: function*() |
| 98 { | 98 { |
| 99 let downloadable = new Downloadable(Prefs.notificationurl); | 99 let downloadable = new Downloadable(Prefs.notificationurl); |
| 100 if (typeof Prefs.notificationdata.lastError === "number") | 100 if (typeof Prefs.notificationdata.lastError === "number") |
| 101 downloadable.lastError = Prefs.notificationdata.lastError; | 101 downloadable.lastError = Prefs.notificationdata.lastError; |
| 102 if (typeof Prefs.notificationdata.lastCheck === "number") | 102 if (typeof Prefs.notificationdata.lastCheck === "number") |
| 103 downloadable.lastCheck = Prefs.notificationdata.lastCheck; | 103 downloadable.lastCheck = Prefs.notificationdata.lastCheck; |
| 104 if (typeof Prefs.notificationdata.data === "object" && "version" in Prefs.no
tificationdata.data) | 104 if (typeof Prefs.notificationdata.data === "object" && "version" in Prefs.no
tificationdata.data) |
| 105 downloadable.lastVersion = Prefs.notificationdata.data.version; | 105 downloadable.lastVersion = Prefs.notificationdata.data.version; |
| 106 if (typeof Prefs.notificationdata.softExpiration === "number") | 106 if (typeof Prefs.notificationdata.softExpiration === "number") |
| 107 downloadable.softExpiration = Prefs.notificationdata.softExpiration; | 107 downloadable.softExpiration = Prefs.notificationdata.softExpiration; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 triggerQuestionListeners: function(id, approved) | 328 triggerQuestionListeners: function(id, approved) |
| 329 { | 329 { |
| 330 if (!(id in listeners)) | 330 if (!(id in listeners)) |
| 331 return; | 331 return; |
| 332 let questionListeners = listeners[id]; | 332 let questionListeners = listeners[id]; |
| 333 for (let listener of questionListeners) | 333 for (let listener of questionListeners) |
| 334 listener(approved); | 334 listener(approved); |
| 335 } | 335 } |
| 336 }; | 336 }; |
| 337 Notification.init(); | 337 Notification.init(); |
| OLD | NEW |