Index: chrome/content/elemHideEmulation.js |
=================================================================== |
--- a/chrome/content/elemHideEmulation.js |
+++ b/chrome/content/elemHideEmulation.js |
@@ -78,33 +78,36 @@ ElemHideEmulation.prototype = { |
findSelectors: function(stylesheet, selectors, filters) |
{ |
// Explicitly ignore third-party stylesheets to ensure consistent behavior |
// between Firefox and Chrome. |
if (!this.isSameOrigin(stylesheet)) |
return; |
- let rules = stylesheet.cssRules; |
+ var rules = stylesheet.cssRules; |
if (!rules) |
return; |
- for (let rule of rules) |
+ for (var i = 0; i < rules.length; i++) |
{ |
+ var rule = rules[i]; |
if (rule.type != rule.STYLE_RULE) |
continue; |
- let style = this.stringifyStyle(rule.style); |
- for (let pattern of this.patterns) |
+ var style = this.stringifyStyle(rule.style); |
+ for (var j = 0; j < this.patterns.length; j++) |
{ |
+ var pattern = this.patterns[j]; |
if (pattern.regexp.test(style)) |
{ |
- let subSelectors = splitSelector(rule.selectorText); |
- for (let subSelector of subSelectors) |
+ var subSelectors = splitSelector(rule.selectorText); |
+ for (var k = 0; k < subSelectors.length; k++) |
{ |
+ var subSelector = subSelectors[k]; |
selectors.push(pattern.prefix + subSelector + pattern.suffix); |
filters.push(pattern.text); |
} |
} |
} |
} |
}, |