| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 let domains = null; | 570 let domains = null; |
| 571 let siteKeys = null; | 571 let siteKeys = null; |
| 572 let thirdParty = null; | 572 let thirdParty = null; |
| 573 let collapse = null; | 573 let collapse = null; |
| 574 let options; | 574 let options; |
| 575 let match = (text.indexOf("$") >= 0 ? Filter.optionsRegExp.exec(text) : null); | 575 let match = (text.indexOf("$") >= 0 ? Filter.optionsRegExp.exec(text) : null); |
| 576 if (match) | 576 if (match) |
| 577 { | 577 { |
| 578 options = match[1].toUpperCase().split(","); | 578 options = match[1].toUpperCase().split(","); |
| 579 text = match.input.substr(0, match.index); | 579 text = match.input.substr(0, match.index); |
| 580 for each (let option in options) | 580 for (let option of options) |
| 581 { | 581 { |
| 582 let value = null; | 582 let value = null; |
| 583 let separatorIndex = option.indexOf("="); | 583 let separatorIndex = option.indexOf("="); |
| 584 if (separatorIndex >= 0) | 584 if (separatorIndex >= 0) |
| 585 { | 585 { |
| 586 value = option.substr(separatorIndex + 1); | 586 value = option.substr(separatorIndex + 1); |
| 587 option = option.substr(0, separatorIndex); | 587 option = option.substr(0, separatorIndex); |
| 588 } | 588 } |
| 589 option = option.replace(/-/, "_"); | 589 option = option.replace(/-/, "_"); |
| 590 if (option in RegExpFilter.typeMap) | 590 if (option in RegExpFilter.typeMap) |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 { | 793 { |
| 794 if (!selector) | 794 if (!selector) |
| 795 { | 795 { |
| 796 if (tagName == "*") | 796 if (tagName == "*") |
| 797 tagName = ""; | 797 tagName = ""; |
| 798 | 798 |
| 799 let id = null; | 799 let id = null; |
| 800 let additional = ""; | 800 let additional = ""; |
| 801 if (attrRules) { | 801 if (attrRules) { |
| 802 attrRules = attrRules.match(/\([\w\-]+(?:[$^*]?=[^\(\)"]*)?\)/g); | 802 attrRules = attrRules.match(/\([\w\-]+(?:[$^*]?=[^\(\)"]*)?\)/g); |
| 803 for each (let rule in attrRules) { | 803 for (let rule of attrRules) { |
| 804 rule = rule.substr(1, rule.length - 2); | 804 rule = rule.substr(1, rule.length - 2); |
| 805 let separatorPos = rule.indexOf("="); | 805 let separatorPos = rule.indexOf("="); |
| 806 if (separatorPos > 0) { | 806 if (separatorPos > 0) { |
| 807 rule = rule.replace(/=/, '="') + '"'; | 807 rule = rule.replace(/=/, '="') + '"'; |
| 808 additional += "[" + rule + "]"; | 808 additional += "[" + rule + "]"; |
| 809 } | 809 } |
| 810 else { | 810 else { |
| 811 if (id) | 811 if (id) |
| 812 { | 812 { |
| 813 let {Utils} = require("utils"); | 813 let {Utils} = require("utils"); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 function ElemHideException(text, domains, selector) | 865 function ElemHideException(text, domains, selector) |
| 866 { | 866 { |
| 867 ElemHideBase.call(this, text, domains, selector); | 867 ElemHideBase.call(this, text, domains, selector); |
| 868 } | 868 } |
| 869 exports.ElemHideException = ElemHideException; | 869 exports.ElemHideException = ElemHideException; |
| 870 | 870 |
| 871 ElemHideException.prototype = | 871 ElemHideException.prototype = |
| 872 { | 872 { |
| 873 __proto__: ElemHideBase.prototype | 873 __proto__: ElemHideBase.prototype |
| 874 }; | 874 }; |
| OLD | NEW |