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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 242 |
243 break nodes; | 243 break nodes; |
244 } | 244 } |
245 } | 245 } |
246 } | 246 } |
247 } | 247 } |
248 | 248 |
249 if (selectors.length > 0 || filters.length > 0) | 249 if (selectors.length > 0 || filters.length > 0) |
250 { | 250 { |
251 browser.runtime.sendMessage({ | 251 browser.runtime.sendMessage({ |
252 type: "devtools.traceElemHide", | 252 type: "hitLogger.traceElemHide", |
253 selectors, filters | 253 selectors, filters |
254 }); | 254 }); |
255 } | 255 } |
256 }, | 256 }, |
257 | 257 |
258 onTimeout() | 258 onTimeout() |
259 { | 259 { |
260 this.checkNodes(this.changedNodes, this.selectors); | 260 this.checkNodes(this.changedNodes, this.selectors); |
261 this.changedNodes = []; | 261 this.changedNodes = []; |
262 this.timeout = null; | 262 this.timeout = null; |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 }, | 487 }, |
488 | 488 |
489 hideElements(elements, filters) | 489 hideElements(elements, filters) |
490 { | 490 { |
491 for (let element of elements) | 491 for (let element of elements) |
492 hideElement(element); | 492 hideElement(element); |
493 | 493 |
494 if (this.tracer) | 494 if (this.tracer) |
495 { | 495 { |
496 browser.runtime.sendMessage({ | 496 browser.runtime.sendMessage({ |
497 type: "devtools.traceElemHide", | 497 type: "hitLogger.traceElemHide", |
498 selectors: [], | 498 selectors: [], |
499 filters | 499 filters |
500 }); | 500 }); |
501 } | 501 } |
502 }, | 502 }, |
503 | 503 |
504 apply() | 504 apply() |
505 { | 505 { |
506 browser.runtime.sendMessage({type: "elemhide.getSelectors"}, response => | 506 browser.runtime.sendMessage({type: "elemhide.getSelectors"}, response => |
507 { | 507 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 let element = event.target; | 543 let element = event.target; |
544 if (/^i?frame$/.test(element.localName)) | 544 if (/^i?frame$/.test(element.localName)) |
545 checkCollapse(element); | 545 checkCollapse(element); |
546 }, true); | 546 }, true); |
547 } | 547 } |
548 | 548 |
549 window.checkCollapse = checkCollapse; | 549 window.checkCollapse = checkCollapse; |
550 window.elemhide = elemhide; | 550 window.elemhide = elemhide; |
551 window.typeMap = typeMap; | 551 window.typeMap = typeMap; |
552 window.getURLsFromElement = getURLsFromElement; | 552 window.getURLsFromElement = getURLsFromElement; |
OLD | NEW |