| OLD | NEW |
| 1 // We are currently limited to ECMAScript 5 in this file, because it is being | 1 // We are currently limited to ECMAScript 5 in this file, because it is being |
| 2 // used in the browser tests. See https://issues.adblockplus.org/ticket/4796 | 2 // used in the browser tests. See https://issues.adblockplus.org/ticket/4796 |
| 3 | 3 |
| 4 var propertySelectorRegExp = /\[\-abp\-properties=(["'])([^"']+)\1\]/; | 4 var propertySelectorRegExp = /\[\-abp\-properties=(["'])([^"']+)\1\]/; |
| 5 | 5 |
| 6 function splitSelector(selector) | 6 function splitSelector(selector) |
| 7 { | 7 { |
| 8 if (selector.indexOf(",") == -1) | 8 if (selector.indexOf(",") == -1) |
| 9 return [selector]; | 9 return [selector]; |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 if (this.patterns.length > 0) | 159 if (this.patterns.length > 0) |
| 160 { | 160 { |
| 161 var document = this.window.document; | 161 var document = this.window.document; |
| 162 this.addSelectors(document.styleSheets); | 162 this.addSelectors(document.styleSheets); |
| 163 document.addEventListener("load", this.onLoad.bind(this), true); | 163 document.addEventListener("load", this.onLoad.bind(this), true); |
| 164 } | 164 } |
| 165 }.bind(this)); | 165 }.bind(this)); |
| 166 } | 166 } |
| 167 }; | 167 }; |
| 168 |
| 169 if (typeof exports != "undefined") |
| 170 { |
| 171 exports.ElemHideEmulation = ElemHideEmulation; |
| 172 exports.splitSelector = splitSelector; |
| 173 } |
| OLD | NEW |