Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: lib/subscriptionInit.js

Issue 29562595: Issue 2824 - Only consider ads subscriptions in chooseFilterSubscription (Closed)
Left Patch Set: Improved comment, inlined checkLocalePrefixMatch and moved subscriptionType check Created Oct. 3, 2017, 9:22 a.m.
Right Patch Set: Fixed a typo in a comment Created Oct. 3, 2017, 10:14 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/utils.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 };
LEFTRIGHT
« no previous file | lib/utils.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld