| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 let match = newPort.name.match(/^devtools-(\d+)$/); | 332 let match = newPort.name.match(/^devtools-(\d+)$/); |
| 333 if (!match) | 333 if (!match) |
| 334 return; | 334 return; |
| 335 | 335 |
| 336 let inspectedTabId = parseInt(match[1], 10); | 336 let inspectedTabId = parseInt(match[1], 10); |
| 337 let localOnBeforeRequest = onBeforeRequest.bind(); | 337 let localOnBeforeRequest = onBeforeRequest.bind(); |
| 338 | 338 |
| 339 chrome.webRequest.onBeforeRequest.addListener( | 339 chrome.webRequest.onBeforeRequest.addListener( |
| 340 localOnBeforeRequest, | 340 localOnBeforeRequest, |
| 341 { | 341 { |
| 342 urls: ["<all_urls>"], | 342 urls: ["http://*/*", "https://*/*"], |
| 343 types: ["main_frame"], | 343 types: ["main_frame"], |
| 344 tabId: inspectedTabId | 344 tabId: inspectedTabId |
| 345 } | 345 } |
| 346 ); | 346 ); |
| 347 | 347 |
| 348 if (panels.size == 0) | 348 if (panels.size == 0) |
| 349 { | 349 { |
| 350 ext.pages.onLoading.addListener(onLoading); | 350 ext.pages.onLoading.addListener(onLoading); |
| 351 FilterNotifier.on("filter.added", onFilterAdded); | 351 FilterNotifier.on("filter.added", onFilterAdded); |
| 352 FilterNotifier.on("filter.removed", onFilterRemoved); | 352 FilterNotifier.on("filter.removed", onFilterRemoved); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 370 panels.set(inspectedTabId, {port: newPort, records: []}); | 370 panels.set(inspectedTabId, {port: newPort, records: []}); |
| 371 }); | 371 }); |
| 372 | 372 |
| 373 port.on("devtools.traceElemHide", (message, sender) => | 373 port.on("devtools.traceElemHide", (message, sender) => |
| 374 { | 374 { |
| 375 logHiddenElements( | 375 logHiddenElements( |
| 376 sender.page, message.selectors, message.filters, | 376 sender.page, message.selectors, message.filters, |
| 377 extractHostFromFrame(sender.frame) | 377 extractHostFromFrame(sender.frame) |
| 378 ); | 378 ); |
| 379 }); | 379 }); |
| LEFT | RIGHT |