OLD | NEW |
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 Loading... |
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.collapse = collapse; |
| 911 |
910 this.csp = csp; | 912 this.csp = csp; |
911 this.rewrite = rewrite; | 913 this.rewrite = rewrite; |
912 } | 914 } |
913 exports.BlockingFilter = BlockingFilter; | 915 exports.BlockingFilter = BlockingFilter; |
914 | 916 |
915 BlockingFilter.prototype = extend(RegExpFilter, { | 917 BlockingFilter.prototype = extend(RegExpFilter, { |
916 type: "blocking", | 918 type: "blocking", |
917 | 919 |
918 /** | 920 /** |
919 * Defines whether the filter should collapse blocked content. | 921 * Defines whether the filter should collapse blocked content. |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 */ | 1096 */ |
1095 function ElemHideEmulationFilter(text, domains, selector) | 1097 function ElemHideEmulationFilter(text, domains, selector) |
1096 { | 1098 { |
1097 ElemHideBase.call(this, text, domains, selector); | 1099 ElemHideBase.call(this, text, domains, selector); |
1098 } | 1100 } |
1099 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; | 1101 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; |
1100 | 1102 |
1101 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { | 1103 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { |
1102 type: "elemhideemulation" | 1104 type: "elemhideemulation" |
1103 }); | 1105 }); |
OLD | NEW |