| Left: | ||
| Right: |
| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 273 if (minVersion) | 273 if (minVersion) |
| 274 subscription.requiredVersion = minVersion; | 274 subscription.requiredVersion = minVersion; |
| 275 else | 275 else |
| 276 delete subscription.requiredVersion; | 276 delete subscription.requiredVersion; |
| 277 | 277 |
| 278 // Process filters | 278 // Process filters |
| 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.stripJunk(line); |
|
Manish Jethani
2018/02/05 16:09:58
Since most of the code has moved out anyway, why n
kzar
2018/02/13 11:56:47
Yea, perhaps we should do that if we continue with
| |
| 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 | 289 |
| 290 return undefined; | 290 return undefined; |
| 291 }, | 291 }, |
| 292 | 292 |
| 293 _onDownloadError(downloadable, downloadURL, error, channelStatus, | 293 _onDownloadError(downloadable, downloadURL, error, channelStatus, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 subscription.filters.map(f => f.text).join("\n"); | 350 subscription.filters.map(f => f.text).join("\n"); |
| 351 redirectCallback("data:text/plain," + encodeURIComponent(data)); | 351 redirectCallback("data:text/plain," + encodeURIComponent(data)); |
| 352 } | 352 } |
| 353 }, false); | 353 }, false); |
| 354 request.send(null); | 354 request.send(null); |
| 355 } | 355 } |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 }; | 358 }; |
| 359 Synchronizer.init(); | 359 Synchronizer.init(); |
| OLD | NEW |