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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 browser.runtime.sendMessage({ | 553 browser.runtime.sendMessage({ |
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 let message = {type: "content.applyFilters"}; | 563 browser.runtime.sendMessage({ |
564 | 564 type: "content.applyFilters", |
565 if (filterTypes) | 565 filterTypes |
566 message.filterTypes = filterTypes; | 566 }, |
567 | 567 response => |
568 browser.runtime.sendMessage(message, response => | |
569 { | 568 { |
570 if (this.tracer) | 569 if (this.tracer) |
571 this.tracer.disconnect(); | 570 this.tracer.disconnect(); |
572 this.tracer = null; | 571 this.tracer = null; |
573 | 572 |
574 if (response.trace) | 573 if (response.trace) |
575 this.tracer = new ElementHidingTracer(); | 574 this.tracer = new ElementHidingTracer(); |
576 | 575 |
577 this.inline = response.inline; | 576 this.inline = response.inline; |
578 this.inlineEmulated = !!response.inlineEmulated; | 577 this.inlineEmulated = !!response.inlineEmulated; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 let element = event.target; | 609 let element = event.target; |
611 if (/^i?frame$/.test(element.localName)) | 610 if (/^i?frame$/.test(element.localName)) |
612 checkCollapse(element); | 611 checkCollapse(element); |
613 }, true); | 612 }, true); |
614 } | 613 } |
615 | 614 |
616 window.checkCollapse = checkCollapse; | 615 window.checkCollapse = checkCollapse; |
617 window.contentFiltering = contentFiltering; | 616 window.contentFiltering = contentFiltering; |
618 window.typeMap = typeMap; | 617 window.typeMap = typeMap; |
619 window.getURLsFromElement = getURLsFromElement; | 618 window.getURLsFromElement = getURLsFromElement; |
LEFT | RIGHT |