OLD | NEW |
| 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 |
| 3 |
1 var propertySelectorRegExp = /\[\-abp\-properties=(["'])([^"']+)\1\]/; | 4 var propertySelectorRegExp = /\[\-abp\-properties=(["'])([^"']+)\1\]/; |
2 | 5 |
3 function splitSelector(selector) | 6 function splitSelector(selector) |
4 { | 7 { |
5 if (selector.indexOf(",") == -1) | 8 if (selector.indexOf(",") == -1) |
6 return [selector]; | 9 return [selector]; |
7 | 10 |
8 var selectors = []; | 11 var selectors = []; |
9 var start = 0; | 12 var start = 0; |
10 var level = 0; | 13 var level = 0; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 apply: function() | 160 apply: function() |
158 { | 161 { |
159 if (this.patterns.length > 0) | 162 if (this.patterns.length > 0) |
160 { | 163 { |
161 var document = this.window.document; | 164 var document = this.window.document; |
162 this.addSelectors(document.styleSheets); | 165 this.addSelectors(document.styleSheets); |
163 document.addEventListener("load", this.onLoad.bind(this), true); | 166 document.addEventListener("load", this.onLoad.bind(this), true); |
164 } | 167 } |
165 } | 168 } |
166 }; | 169 }; |
OLD | NEW |