| OLD | NEW |
| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 // Once all supported platforms have implemented this API, we can remove | 523 // Once all supported platforms have implemented this API, we can remove |
| 524 // the code below. See issue #5090. | 524 // the code below. See issue #5090. |
| 525 // Related Chrome and Firefox issues: | 525 // Related Chrome and Firefox issues: |
| 526 // https://bugs.chromium.org/p/chromium/issues/detail?id=632009 | 526 // https://bugs.chromium.org/p/chromium/issues/detail?id=632009 |
| 527 // https://bugzilla.mozilla.org/show_bug.cgi?id=1310026 | 527 // https://bugzilla.mozilla.org/show_bug.cgi?id=1310026 |
| 528 this.addSelectorsInline(selectors, groupName, appendOnly); | 528 this.addSelectorsInline(selectors, groupName, appendOnly); |
| 529 } | 529 } |
| 530 else | 530 else |
| 531 { | 531 { |
| 532 browser.runtime.sendMessage({ | 532 browser.runtime.sendMessage({ |
| 533 type: "elemhide.injectSelectors", | 533 type: "content.injectSelectors", |
| 534 selectors, | 534 selectors, |
| 535 groupName, | 535 groupName, |
| 536 appendOnly | 536 appendOnly |
| 537 }); | 537 }); |
| 538 } | 538 } |
| 539 | 539 |
| 540 // Only trace selectors that are based directly on hiding filters | 540 // Only trace selectors that are based directly on hiding filters |
| 541 // (i.e. leave out collapsing selectors). | 541 // (i.e. leave out collapsing selectors). |
| 542 if (this.tracer && groupName != "collapsing") | 542 if (this.tracer && groupName != "collapsing") |
| 543 this.tracer.addSelectors(selectors, filters); | 543 this.tracer.addSelectors(selectors, filters); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 let element = event.target; | 609 let element = event.target; |
| 610 if (/^i?frame$/.test(element.localName)) | 610 if (/^i?frame$/.test(element.localName)) |
| 611 checkCollapse(element); | 611 checkCollapse(element); |
| 612 }, true); | 612 }, true); |
| 613 } | 613 } |
| 614 | 614 |
| 615 window.checkCollapse = checkCollapse; | 615 window.checkCollapse = checkCollapse; |
| 616 window.contentFiltering = contentFiltering; | 616 window.contentFiltering = contentFiltering; |
| 617 window.typeMap = typeMap; | 617 window.typeMap = typeMap; |
| 618 window.getURLsFromElement = getURLsFromElement; | 618 window.getURLsFromElement = getURLsFromElement; |
| OLD | NEW |