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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 if (subscription instanceof SpecialSubscription && | 75 if (subscription instanceof SpecialSubscription && |
76 subscription.filters.length > 0) | 76 subscription.filters.length > 0) |
77 return false; | 77 return false; |
78 } | 78 } |
79 | 79 |
80 return true; | 80 return true; |
81 } | 81 } |
82 | 82 |
83 /** | 83 /** |
84 * Finds the element for the default ad blocking filter subscription based | 84 * Finds the element for the default ad blocking filter subscription based |
85 * on the users locale. | 85 * on the user's locale. |
Sebastian Noack
2017/10/03 10:01:27
Typo: users => user's
wspee
2017/10/03 10:14:46
Done.
| |
86 * | 86 * |
87 * @param {HTMLCollection} subscriptions | 87 * @param {HTMLCollection} subscriptions |
88 * @return {Element} | 88 * @return {Element} |
89 */ | 89 */ |
90 function chooseFilterSubscription(subscriptions) | 90 function chooseFilterSubscription(subscriptions) |
91 { | 91 { |
92 let selectedItem = null; | 92 let selectedItem = null; |
93 let selectedPrefix = null; | 93 let selectedPrefix = null; |
94 let matchCount = 0; | 94 let matchCount = 0; |
95 for (let subscription of subscriptions) | 95 for (let subscription of subscriptions) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 * Sets a callback that is called with an array of subscriptions to be added | 228 * Sets a callback that is called with an array of subscriptions to be added |
229 * during initialization. The callback must return an array of subscriptions | 229 * during initialization. The callback must return an array of subscriptions |
230 * that will effectively be added. | 230 * that will effectively be added. |
231 * | 231 * |
232 * @param {function} callback | 232 * @param {function} callback |
233 */ | 233 */ |
234 exports.setSubscriptionsCallback = callback => | 234 exports.setSubscriptionsCallback = callback => |
235 { | 235 { |
236 subscriptionsCallback = callback; | 236 subscriptionsCallback = callback; |
237 }; | 237 }; |
LEFT | RIGHT |