LEFT | RIGHT |
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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 // between Firefox and Chrome. | 425 // between Firefox and Chrome. |
426 if (!this.isSameOrigin(stylesheet)) | 426 if (!this.isSameOrigin(stylesheet)) |
427 continue; | 427 continue; |
428 | 428 |
429 let rules = stylesheet.cssRules; | 429 let rules = stylesheet.cssRules; |
430 if (!rules) | 430 if (!rules) |
431 continue; | 431 continue; |
432 | 432 |
433 // Chrome < 51 doesn't have an iterable CSSRuleList | 433 // Chrome < 51 doesn't have an iterable CSSRuleList |
434 // https://issues.adblockplus.org/ticket/5773 | 434 // https://issues.adblockplus.org/ticket/5773 |
435 for (let i = 0; i < rules.length; i++) | 435 for (let j = 0; j < rules.length; j++) |
436 { | 436 { |
437 let rule = rules[i]; | 437 let rule = rules[j]; |
438 if (rule.type != rule.STYLE_RULE) | 438 if (rule.type != rule.STYLE_RULE) |
439 continue; | 439 continue; |
440 | 440 |
441 cssStyles.push(stringifyStyle(rule)); | 441 cssStyles.push(stringifyStyle(rule)); |
442 } | 442 } |
443 } | 443 } |
444 | 444 |
445 let {document} = this.window; | 445 let {document} = this.window; |
446 | 446 |
447 let patterns = this.patterns.slice(); | 447 let patterns = this.patterns.slice(); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 subtree: true | 610 subtree: true |
611 } | 611 } |
612 ); | 612 ); |
613 document.addEventListener("load", this.onLoad.bind(this), true); | 613 document.addEventListener("load", this.onLoad.bind(this), true); |
614 } | 614 } |
615 }); | 615 }); |
616 } | 616 } |
617 }; | 617 }; |
618 | 618 |
619 exports.ElemHideEmulation = ElemHideEmulation; | 619 exports.ElemHideEmulation = ElemHideEmulation; |
LEFT | RIGHT |