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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 * data corruption or misconfiguration. | 68 * data corruption or misconfiguration. |
69 * | 69 * |
70 * @return {boolean} | 70 * @return {boolean} |
71 */ | 71 */ |
72 function shouldAddDefaultSubscriptions() | 72 function shouldAddDefaultSubscriptions() |
73 { | 73 { |
74 for (let subscription of FilterStorage.subscriptions) | 74 for (let subscription of FilterStorage.subscriptions) |
75 { | 75 { |
76 if (subscription instanceof DownloadableSubscription && | 76 if (subscription instanceof DownloadableSubscription && |
77 subscription.url != Prefs.subscriptions_exceptionsurl && | 77 subscription.url != Prefs.subscriptions_exceptionsurl && |
78 subscription.url != Prefs.subscriptions_antiadblockurl) | 78 subscription.url != Prefs.subscriptions_antiadblockurl && |
79 subscription.type != "circumvention") | |
79 return false; | 80 return false; |
80 | 81 |
81 if (subscription instanceof SpecialSubscription && | 82 if (subscription instanceof SpecialSubscription && |
82 subscription.filters.length > 0) | 83 subscription.filters.length > 0) |
83 return false; | 84 return false; |
84 } | 85 } |
85 | |
Sebastian Noack
2018/08/02 22:47:41
Nit: Unrelated change.
hub
2018/08/02 22:59:24
Done.
| |
86 return true; | 86 return true; |
87 } | 87 } |
88 | 88 |
89 /** | 89 /** |
90 * @typedef {object} DefaultSubscriptions | 90 * @typedef {object} DefaultSubscriptions |
91 * @property {?Element} ads | 91 * @property {?Element} ads |
92 * @property {?Element} circumvention | 92 * @property {?Element} circumvention |
93 */ | 93 */ |
94 /** | 94 /** |
95 * Finds the elements for the default ad blocking filter subscriptions based | 95 * Finds the elements for the default ad blocking filter subscriptions based |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 * | 333 * |
334 * @param {function} callback | 334 * @param {function} callback |
335 */ | 335 */ |
336 exports.setSubscriptionsCallback = callback => | 336 exports.setSubscriptionsCallback = callback => |
337 { | 337 { |
338 subscriptionsCallback = callback; | 338 subscriptionsCallback = callback; |
339 }; | 339 }; |
340 | 340 |
341 // Exports for tests only | 341 // Exports for tests only |
342 exports.chooseFilterSubscriptions = chooseFilterSubscriptions; | 342 exports.chooseFilterSubscriptions = chooseFilterSubscriptions; |
OLD | NEW |