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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 let match = newPort.name.match(/^devtools-(\d+)$/); | 339 let match = newPort.name.match(/^devtools-(\d+)$/); |
340 if (!match) | 340 if (!match) |
341 return; | 341 return; |
342 | 342 |
343 let inspectedTabId = parseInt(match[1], 10); | 343 let inspectedTabId = parseInt(match[1], 10); |
344 let localOnBeforeRequest = onBeforeRequest.bind(); | 344 let localOnBeforeRequest = onBeforeRequest.bind(); |
345 | 345 |
346 chrome.webRequest.onBeforeRequest.addListener( | 346 chrome.webRequest.onBeforeRequest.addListener( |
347 localOnBeforeRequest, | 347 localOnBeforeRequest, |
348 { | 348 { |
349 urls: ["http://*/*", "https://*/*", "ws://*/*", "wss://*/*"], | 349 urls: ["http://*/*", "https://*/*"], |
Sebastian Noack
2017/04/19 12:10:11
ws[s]:// is redundant here since this code is only
Jon Sonesen
2017/04/19 12:22:27
Done.
| |
350 types: ["main_frame"], | 350 types: ["main_frame"], |
351 tabId: inspectedTabId | 351 tabId: inspectedTabId |
352 } | 352 } |
353 ); | 353 ); |
354 | 354 |
355 if (!hasPanels()) | 355 if (!hasPanels()) |
356 { | 356 { |
357 ext.pages.onLoading.addListener(onLoading); | 357 ext.pages.onLoading.addListener(onLoading); |
358 FilterNotifier.on("filter.added", onFilterAdded); | 358 FilterNotifier.on("filter.added", onFilterAdded); |
359 FilterNotifier.on("filter.removed", onFilterRemoved); | 359 FilterNotifier.on("filter.removed", onFilterRemoved); |
(...skipping 17 matching lines...) Expand all Loading... | |
377 panels[inspectedTabId] = {port: newPort, records: []}; | 377 panels[inspectedTabId] = {port: newPort, records: []}; |
378 }); | 378 }); |
379 | 379 |
380 port.on("devtools.traceElemHide", (message, sender) => | 380 port.on("devtools.traceElemHide", (message, sender) => |
381 { | 381 { |
382 logHiddenElements( | 382 logHiddenElements( |
383 sender.page, message.selectors, message.filters, | 383 sender.page, message.selectors, message.filters, |
384 extractHostFromFrame(sender.frame) | 384 extractHostFromFrame(sender.frame) |
385 ); | 385 ); |
386 }); | 386 }); |
LEFT | RIGHT |