Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
484 | 484 |
485 yield "# Adblock Plus preferences"; | 485 yield "# Adblock Plus preferences"; |
486 yield "version=" + this.formatVersion; | 486 yield "version=" + this.formatVersion; |
487 | 487 |
488 let saved = new Set(); | 488 let saved = new Set(); |
489 | 489 |
490 // Save subscriptions | 490 // Save subscriptions |
491 for (let subscription of subscriptions) | 491 for (let subscription of subscriptions) |
492 { | 492 { |
493 yield* subscription.serialize(); | 493 yield* subscription.serialize(); |
494 | 494 yield* subscription.serializeFilters(); |
495 if (subscription.filters.length) | |
Manish Jethani
2018/10/22 20:18:01
We don't really need this check, as I said in my p
Jon Sonesen
2018/10/22 22:59:36
My bad, I'll fix it
| |
496 { | |
497 yield* subscription.serializeFilters(); | |
498 } | |
499 } | 495 } |
500 | 496 |
501 // Save filter data | 497 // Save filter data |
502 for (let subscription of subscriptions) | 498 for (let subscription of subscriptions) |
503 { | 499 { |
504 for (let filter of subscription.filters) | 500 for (let filter of subscription.filters) |
505 { | 501 { |
506 if (!saved.has(filter.text)) | 502 if (!saved.has(filter.text)) |
507 { | 503 { |
508 yield* filter.serialize(); | 504 yield* filter.serialize(); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
667 * disconnected from its filters. | 663 * disconnected from its filters. |
668 */ | 664 */ |
669 function disconnectSubscriptionFilters(subscription) | 665 function disconnectSubscriptionFilters(subscription) |
670 { | 666 { |
671 if (!filterStorage.knownSubscriptions.has(subscription.url)) | 667 if (!filterStorage.knownSubscriptions.has(subscription.url)) |
672 return; | 668 return; |
673 | 669 |
674 for (let filter of subscription.filters) | 670 for (let filter of subscription.filters) |
675 filter.removeSubscription(subscription); | 671 filter.removeSubscription(subscription); |
676 } | 672 } |
LEFT | RIGHT |