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 11 matching lines...) Expand all Loading... |
22 ElemHideFilter} = require("../adblockpluscore/lib/filterClasses"); | 22 ElemHideFilter} = require("../adblockpluscore/lib/filterClasses"); |
23 const {SpecialSubscription} = | 23 const {SpecialSubscription} = |
24 require("../adblockpluscore/lib/subscriptionClasses"); | 24 require("../adblockpluscore/lib/subscriptionClasses"); |
25 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); | 25 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); |
26 const {defaultMatcher} = require("../adblockpluscore/lib/matcher"); | 26 const {defaultMatcher} = require("../adblockpluscore/lib/matcher"); |
27 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); | 27 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
28 const {extractHostFromFrame} = require("./url"); | 28 const {extractHostFromFrame} = require("./url"); |
29 const {port} = require("./messaging"); | 29 const {port} = require("./messaging"); |
30 | 30 |
31 const nonRequestTypes = ["DOCUMENT", "ELEMHIDE", | 31 const nonRequestTypes = ["DOCUMENT", "ELEMHIDE", |
32 "GENERICBLOCK", "GENERICHIDE", "CSP"]; | 32 "GENERICBLOCK", "GENERICHIDE", "CSP", "REWRITE"]; |
33 | 33 |
34 let panels = new Map(); | 34 let panels = new Map(); |
35 | 35 |
36 function isActivePanel(panel) | 36 function isActivePanel(panel) |
37 { | 37 { |
38 return panel && !panel.reload && !panel.reloading; | 38 return panel && !panel.reload && !panel.reloading; |
39 } | 39 } |
40 | 40 |
41 function getActivePanel(tabId) | 41 function getActivePanel(tabId) |
42 { | 42 { |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 panels.set(inspectedTabId, {port: newPort, records: []}); | 377 panels.set(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.id, message.selectors, message.filters, | 383 sender.page.id, message.selectors, message.filters, |
384 extractHostFromFrame(sender.frame) | 384 extractHostFromFrame(sender.frame) |
385 ); | 385 ); |
386 }); | 386 }); |
OLD | NEW |