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

Side by Side Diff: lib/filterClasses.js

Issue 29799602: Noissue - Avoid setting BlockingFilter instance properties (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Avoid setting csp and rewrite properties as well Created June 5, 2018, 2:20 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 * BlockingFilter.prototype.rewrite. 899 * BlockingFilter.prototype.rewrite.
900 * @constructor 900 * @constructor
901 * @augments RegExpFilter 901 * @augments RegExpFilter
902 */ 902 */
903 function BlockingFilter(text, regexpSource, contentType, matchCase, domains, 903 function BlockingFilter(text, regexpSource, contentType, matchCase, domains,
904 thirdParty, sitekeys, collapse, csp, rewrite) 904 thirdParty, sitekeys, collapse, csp, rewrite)
905 { 905 {
906 RegExpFilter.call(this, text, regexpSource, contentType, matchCase, domains, 906 RegExpFilter.call(this, text, regexpSource, contentType, matchCase, domains,
907 thirdParty, sitekeys); 907 thirdParty, sitekeys);
908 908
909 this.collapse = collapse; 909 if (collapse != null)
910 this.csp = csp; 910 this.collapse = collapse;
911 this.rewrite = rewrite; 911
912 if (csp != null)
913 this.csp = csp;
914
915 if (rewrite != null)
916 this.rewrite = rewrite;
912 } 917 }
913 exports.BlockingFilter = BlockingFilter; 918 exports.BlockingFilter = BlockingFilter;
914 919
915 BlockingFilter.prototype = extend(RegExpFilter, { 920 BlockingFilter.prototype = extend(RegExpFilter, {
916 type: "blocking", 921 type: "blocking",
917 922
918 /** 923 /**
919 * Defines whether the filter should collapse blocked content. 924 * Defines whether the filter should collapse blocked content.
920 * Can be null (use the global preference). 925 * Can be null (use the global preference).
921 * @type {?boolean} 926 * @type {?boolean}
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 */ 1099 */
1095 function ElemHideEmulationFilter(text, domains, selector) 1100 function ElemHideEmulationFilter(text, domains, selector)
1096 { 1101 {
1097 ElemHideBase.call(this, text, domains, selector); 1102 ElemHideBase.call(this, text, domains, selector);
1098 } 1103 }
1099 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; 1104 exports.ElemHideEmulationFilter = ElemHideEmulationFilter;
1100 1105
1101 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { 1106 ElemHideEmulationFilter.prototype = extend(ElemHideBase, {
1102 type: "elemhideemulation" 1107 type: "elemhideemulation"
1103 }); 1108 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld