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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 type: "hitLogger.traceElemHide", | 554 type: "hitLogger.traceElemHide", |
555 selectors: [], | 555 selectors: [], |
556 filters | 556 filters |
557 }); | 557 }); |
558 } | 558 } |
559 }, | 559 }, |
560 | 560 |
561 apply(filterTypes) | 561 apply(filterTypes) |
562 { | 562 { |
563 browser.runtime.sendMessage({ | 563 browser.runtime.sendMessage({ |
564 type: "content.applyFilters", filterTypes | 564 type: "content.applyFilters", |
| 565 filterTypes |
565 }, | 566 }, |
566 response => | 567 response => |
567 { | 568 { |
568 if (this.tracer) | 569 if (this.tracer) |
569 this.tracer.disconnect(); | 570 this.tracer.disconnect(); |
570 this.tracer = null; | 571 this.tracer = null; |
571 | 572 |
572 if (response.trace) | 573 if (response.trace) |
573 this.tracer = new ElementHidingTracer(); | 574 this.tracer = new ElementHidingTracer(); |
574 | 575 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 let element = event.target; | 609 let element = event.target; |
609 if (/^i?frame$/.test(element.localName)) | 610 if (/^i?frame$/.test(element.localName)) |
610 checkCollapse(element); | 611 checkCollapse(element); |
611 }, true); | 612 }, true); |
612 } | 613 } |
613 | 614 |
614 window.checkCollapse = checkCollapse; | 615 window.checkCollapse = checkCollapse; |
615 window.contentFiltering = contentFiltering; | 616 window.contentFiltering = contentFiltering; |
616 window.typeMap = typeMap; | 617 window.typeMap = typeMap; |
617 window.getURLsFromElement = getURLsFromElement; | 618 window.getURLsFromElement = getURLsFromElement; |
LEFT | RIGHT |