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

Side by Side Diff: lib/filterClasses.js

Issue 29801555: Noissue - Check only first two characters for exception marker (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 7, 2018, 9:22 a.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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 719
720 /** 720 /**
721 * Creates a RegExp filter from its text representation 721 * Creates a RegExp filter from its text representation
722 * @param {string} text same as in Filter() 722 * @param {string} text same as in Filter()
723 * @return {Filter} 723 * @return {Filter}
724 */ 724 */
725 RegExpFilter.fromText = function(text) 725 RegExpFilter.fromText = function(text)
726 { 726 {
727 let blocking = true; 727 let blocking = true;
728 let origText = text; 728 let origText = text;
729 if (text.indexOf("@@") == 0) 729 if (text[0] == "@" && text[1] == "@")
730 { 730 {
731 blocking = false; 731 blocking = false;
732 text = text.substr(2); 732 text = text.substr(2);
733 } 733 }
734 734
735 let contentType = null; 735 let contentType = null;
736 let matchCase = null; 736 let matchCase = null;
737 let domains = null; 737 let domains = null;
738 let sitekeys = null; 738 let sitekeys = null;
739 let thirdParty = null; 739 let thirdParty = null;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 */ 1082 */
1083 function ElemHideEmulationFilter(text, domains, selector) 1083 function ElemHideEmulationFilter(text, domains, selector)
1084 { 1084 {
1085 ElemHideBase.call(this, text, domains, selector); 1085 ElemHideBase.call(this, text, domains, selector);
1086 } 1086 }
1087 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; 1087 exports.ElemHideEmulationFilter = ElemHideEmulationFilter;
1088 1088
1089 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { 1089 ElemHideEmulationFilter.prototype = extend(ElemHideBase, {
1090 type: "elemhideemulation" 1090 type: "elemhideemulation"
1091 }); 1091 });
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