| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 lines.shift(); | 279 lines.shift(); |
| 280 let filters = []; | 280 let filters = []; |
| 281 for (let line of lines) | 281 for (let line of lines) |
| 282 { | 282 { |
| 283 line = Filter.normalize(line); | 283 line = Filter.normalize(line); |
| 284 if (line) | 284 if (line) |
| 285 filters.push(Filter.fromText(line)); | 285 filters.push(Filter.fromText(line)); |
| 286 } | 286 } |
| 287 | 287 |
| 288 FilterStorage.updateSubscriptionFilters(subscription, filters); | 288 FilterStorage.updateSubscriptionFilters(subscription, filters); |
| 289 | |
| 290 return undefined; | |
| 291 }, | 289 }, |
| 292 | 290 |
| 293 _onDownloadError(downloadable, downloadURL, error, channelStatus, | 291 _onDownloadError(downloadable, downloadURL, error, channelStatus, |
| 294 responseStatus, redirectCallback) | 292 responseStatus, redirectCallback) |
| 295 { | 293 { |
| 296 let subscription = Subscription.fromURL(downloadable.url); | 294 let subscription = Subscription.fromURL(downloadable.url); |
| 297 subscription.lastDownload = Math.round(Date.now() / MILLIS_IN_SECOND); | 295 subscription.lastDownload = Math.round(Date.now() / MILLIS_IN_SECOND); |
| 298 subscription.downloadStatus = error; | 296 subscription.downloadStatus = error; |
| 299 | 297 |
| 300 // Request fallback URL if necessary - for automatic updates only | 298 // Request fallback URL if necessary - for automatic updates only |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 subscription.filters.map(f => f.text).join("\n"); | 348 subscription.filters.map(f => f.text).join("\n"); |
| 351 redirectCallback("data:text/plain," + encodeURIComponent(data)); | 349 redirectCallback("data:text/plain," + encodeURIComponent(data)); |
| 352 } | 350 } |
| 353 }, false); | 351 }, false); |
| 354 request.send(null); | 352 request.send(null); |
| 355 } | 353 } |
| 356 } | 354 } |
| 357 } | 355 } |
| 358 }; | 356 }; |
| 359 Synchronizer.init(); | 357 Synchronizer.init(); |
| OLD | NEW |