| Left: | ||
| Right: |
| 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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 441 | 441 |
| 442 if (this.tracer) | 442 if (this.tracer) |
| 443 this.tracer.addSelectors(selectors, filters); | 443 this.tracer.addSelectors(selectors, filters); |
| 444 }, | 444 }, |
| 445 | 445 |
| 446 hideElements(elements, filters) | 446 hideElements(elements, filters) |
| 447 { | 447 { |
| 448 for (let element of elements) | 448 for (let element of elements) |
| 449 hideElement(element); | 449 hideElement(element); |
| 450 | 450 |
| 451 if (this.tracer) | 451 if (this.tracer) |
|
kzar
2017/06/14 10:20:30
Nit: Since this if clause spans multiple lines ple
hub
2017/06/14 15:49:27
it did pass ESLint. Adding the braces.
| |
| 452 { | |
| 452 ext.backgroundPage.sendMessage({ | 453 ext.backgroundPage.sendMessage({ |
| 453 type: "devtools.traceElemHide", | 454 type: "devtools.traceElemHide", |
| 454 selectors: [], | 455 selectors: [], |
| 455 filters | 456 filters |
| 456 }); | 457 }); |
| 458 } | |
| 457 }, | 459 }, |
| 458 | 460 |
| 459 apply() | 461 apply() |
| 460 { | 462 { |
| 461 ext.backgroundPage.sendMessage({type: "get-selectors"}, response => | 463 ext.backgroundPage.sendMessage({type: "get-selectors"}, response => |
| 462 { | 464 { |
| 463 if (this.tracer) | 465 if (this.tracer) |
| 464 this.tracer.disconnect(); | 466 this.tracer.disconnect(); |
| 465 this.tracer = null; | 467 this.tracer = null; |
| 466 | 468 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 489 checkCollapse(event.target); | 491 checkCollapse(event.target); |
| 490 }, true); | 492 }, true); |
| 491 | 493 |
| 492 document.addEventListener("load", event => | 494 document.addEventListener("load", event => |
| 493 { | 495 { |
| 494 let element = event.target; | 496 let element = event.target; |
| 495 if (/^i?frame$/.test(element.localName)) | 497 if (/^i?frame$/.test(element.localName)) |
| 496 checkCollapse(element); | 498 checkCollapse(element); |
| 497 }, true); | 499 }, true); |
| 498 } | 500 } |
| LEFT | RIGHT |