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

Side by Side Diff: lib/filterClasses.js

Issue 5840485868371968: Issue 616 - Add $generichide + $genericblock filter options and enforce them. (Closed)
Patch Set: Rebased. Created March 12, 2015, 8:33 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 | « lib/contentPolicy.js ('k') | 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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 PING: 1, 742 PING: 1,
743 XMLHTTPREQUEST: 2048, 743 XMLHTTPREQUEST: 2048,
744 OBJECT_SUBREQUEST: 4096, 744 OBJECT_SUBREQUEST: 4096,
745 DTD: 1, 745 DTD: 1,
746 MEDIA: 16384, 746 MEDIA: 16384,
747 FONT: 32768, 747 FONT: 32768,
748 748
749 BACKGROUND: 4, // Backwards compat, same as IMAGE 749 BACKGROUND: 4, // Backwards compat, same as IMAGE
750 750
751 POPUP: 0x10000000, 751 POPUP: 0x10000000,
752 ELEMHIDE: 0x40000000 752 GENERICBLOCK: 0x20000000,
753 ELEMHIDE: 0x40000000,
754 GENERICHIDE: 0x80000000
753 }; 755 };
754 756
755 // ELEMHIDE, POPUP option shouldn't be there by default 757 // ELEMHIDE, POPUP, GENERICHIDE and GENERICBLOCK options shouldn't be there by d efault
756 RegExpFilter.prototype.contentType &= ~(RegExpFilter.typeMap.ELEMHIDE | RegExpFi lter.typeMap.POPUP); 758 RegExpFilter.prototype.contentType &= ~(RegExpFilter.typeMap.ELEMHIDE |
759 RegExpFilter.typeMap.POPUP |
760 RegExpFilter.typeMap.GENERICHIDE |
761 RegExpFilter.typeMap.GENERICBLOCK);
757 762
758 /** 763 /**
759 * Class for blocking filters 764 * Class for blocking filters
760 * @param {String} text see Filter() 765 * @param {String} text see Filter()
761 * @param {String} regexpSource see RegExpFilter() 766 * @param {String} regexpSource see RegExpFilter()
762 * @param {Number} contentType see RegExpFilter() 767 * @param {Number} contentType see RegExpFilter()
763 * @param {Boolean} matchCase see RegExpFilter() 768 * @param {Boolean} matchCase see RegExpFilter()
764 * @param {String} domains see RegExpFilter() 769 * @param {String} domains see RegExpFilter()
765 * @param {Boolean} thirdParty see RegExpFilter() 770 * @param {Boolean} thirdParty see RegExpFilter()
766 * @param {String} sitekeys see RegExpFilter() 771 * @param {String} sitekeys see RegExpFilter()
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 function ElemHideException(text, domains, selector) 945 function ElemHideException(text, domains, selector)
941 { 946 {
942 ElemHideBase.call(this, text, domains, selector); 947 ElemHideBase.call(this, text, domains, selector);
943 } 948 }
944 exports.ElemHideException = ElemHideException; 949 exports.ElemHideException = ElemHideException;
945 950
946 ElemHideException.prototype = 951 ElemHideException.prototype =
947 { 952 {
948 __proto__: ElemHideBase.prototype 953 __proto__: ElemHideBase.prototype
949 }; 954 };
OLDNEW
« no previous file with comments | « lib/contentPolicy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld