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: Add JSDoc for collection parameter Created Jan. 28, 2019, 5:34 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
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] An optional list of filters to which 303 * @param {?Array.<Filter>} [collection] An optional list of filters to which
304 * to append any results. If specified, the function adds <em>all</em> 304 * to append any results. If specified, the function adds <em>all</em>
305 * matching filters to the list; if ommitted, the function directly returns 305 * matching filters to the list; if omitted, the function directly returns
306 * the first matching filter. 306 * the first matching filter.
307 * @returns {?Filter} 307 * @returns {?Filter}
308 * @protected 308 * @protected
309 */ 309 */
310 checkEntryMatch(keyword, location, typeMask, docDomain, thirdParty, sitekey, 310 checkEntryMatch(keyword, location, typeMask, docDomain, thirdParty, sitekey,
311 specificOnly, collection) 311 specificOnly, collection)
312 { 312 {
313 // 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
314 // not contain any default content types. 314 // not contain any default content types.
315 if ((typeMask & DEFAULT_TYPES) != 0) 315 if ((typeMask & DEFAULT_TYPES) != 0)
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 674
675 exports.CombinedMatcher = CombinedMatcher; 675 exports.CombinedMatcher = CombinedMatcher;
676 676
677 /** 677 /**
678 * Shared {@link CombinedMatcher} instance that should usually be used. 678 * Shared {@link CombinedMatcher} instance that should usually be used.
679 * @type {CombinedMatcher} 679 * @type {CombinedMatcher}
680 */ 680 */
681 let defaultMatcher = new CombinedMatcher(); 681 let defaultMatcher = new CombinedMatcher();
682 682
683 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