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

Delta Between Two Patch Sets: lib/matcher.js

Issue 29990555: Issue 7179 - Add function to return all matching filters (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created Jan. 25, 2019, 12:14 p.m.
Right Patch Set: Fix typo Created Jan. 28, 2019, 5:35 p.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 | test/matcher.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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 /** 294 /**
295 * Checks whether the entries for a particular keyword match a URL 295 * Checks whether the entries for a particular keyword match a URL
296 * @param {string} keyword 296 * @param {string} keyword
297 * @param {string} location 297 * @param {string} location
298 * @param {number} typeMask 298 * @param {number} typeMask
299 * @param {string} [docDomain] 299 * @param {string} [docDomain]
300 * @param {boolean} [thirdParty] 300 * @param {boolean} [thirdParty]
301 * @param {string} [sitekey] 301 * @param {string} [sitekey]
302 * @param {boolean} [specificOnly] 302 * @param {boolean} [specificOnly]
303 * @param {Array.<Filter>} collection 303 * @param {?Array.<Filter>} [collection] An optional list of filters to which
hub 2019/01/25 20:52:57 I think this parameter deserve a little bit of exp
Manish Jethani 2019/01/28 17:37:08 Done.
304 * to append any results. If specified, the function adds <em>all</em>
305 * matching filters to the list; if omitted, the function directly returns
306 * the first matching filter.
304 * @returns {?Filter} 307 * @returns {?Filter}
305 * @protected 308 * @protected
306 */ 309 */
307 checkEntryMatch(keyword, location, typeMask, docDomain, thirdParty, sitekey, 310 checkEntryMatch(keyword, location, typeMask, docDomain, thirdParty, sitekey,
308 specificOnly, collection) 311 specificOnly, collection)
309 { 312 {
310 // We need to skip the simple (location-only) filters if the type mask does 313 // We need to skip the simple (location-only) filters if the type mask does
311 // not contain any default content types. 314 // not contain any default content types.
312 if ((typeMask & DEFAULT_TYPES) != 0) 315 if ((typeMask & DEFAULT_TYPES) != 0)
313 { 316 {
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 674
672 exports.CombinedMatcher = CombinedMatcher; 675 exports.CombinedMatcher = CombinedMatcher;
673 676
674 /** 677 /**
675 * Shared {@link CombinedMatcher} instance that should usually be used. 678 * Shared {@link CombinedMatcher} instance that should usually be used.
676 * @type {CombinedMatcher} 679 * @type {CombinedMatcher}
677 */ 680 */
678 let defaultMatcher = new CombinedMatcher(); 681 let defaultMatcher = new CombinedMatcher();
679 682
680 exports.defaultMatcher = defaultMatcher; 683 exports.defaultMatcher = defaultMatcher;
LEFTRIGHT
« no previous file | test/matcher.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld