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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 * @param {number[]} tabIds The tabIds associated with the request | 123 * @param {number[]} tabIds The tabIds associated with the request |
124 * @param {string} url The URL of the request | 124 * @param {string} url The URL of the request |
125 * @param {string} type The request type | 125 * @param {string} type The request type |
126 * @param {string} docDomain The IDN-decoded hostname of the document | 126 * @param {string} docDomain The IDN-decoded hostname of the document |
127 * @param {boolean} thirdParty Whether the origin of the request and | 127 * @param {boolean} thirdParty Whether the origin of the request and |
128 * document differs | 128 * document differs |
129 * @param {?string} sitekey The active sitekey if there is any | 129 * @param {?string} sitekey The active sitekey if there is any |
130 * @param {?boolean} specificOnly Whether generic filters should be ignored | 130 * @param {?boolean} specificOnly Whether generic filters should be ignored |
131 * @param {?BlockingFilter} filter The matched filter or null if there is no | 131 * @param {?BlockingFilter} filter The matched filter or null if there is no |
132 * match | 132 * match |
| 133 * @param {?string} rewrittenTo The query URL was rewritten to this new URL |
133 */ | 134 */ |
134 exports.logRequest = function(tabIds, url, type, docDomain, | 135 exports.logRequest = function(tabIds, url, type, docDomain, |
135 thirdParty, sitekey, | 136 thirdParty, sitekey, |
136 specificOnly, filter) | 137 specificOnly, filter, rewrittenTo) |
137 { | 138 { |
138 for (let tabId of tabIds) | 139 for (let tabId of tabIds) |
139 { | 140 { |
140 let panel = getActivePanel(tabId); | 141 let panel = getActivePanel(tabId); |
141 if (panel) | 142 if (panel) |
142 { | 143 { |
143 let request = {url, type, docDomain, thirdParty, sitekey, specificOnly}; | 144 let request = { |
| 145 url, type, docDomain, thirdParty, sitekey, specificOnly, rewrittenTo |
| 146 }; |
144 addRecord(panel, request, filter); | 147 addRecord(panel, request, filter); |
145 } | 148 } |
146 } | 149 } |
147 }; | 150 }; |
148 | 151 |
149 /** | 152 /** |
150 * Logs active element hiding filters to the devtools panel. | 153 * Logs active element hiding filters to the devtools panel. |
151 * | 154 * |
152 * @param {number} tabId The ID of the tab, the elements were hidden in | 155 * @param {number} tabId The ID of the tab, the elements were hidden in |
153 * @param {string[]} selectors The selectors of applied ElemHideFilters | 156 * @param {string[]} selectors The selectors of applied ElemHideFilters |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 panels.set(inspectedTabId, {port: newPort, records: []}); | 380 panels.set(inspectedTabId, {port: newPort, records: []}); |
378 }); | 381 }); |
379 | 382 |
380 port.on("devtools.traceElemHide", (message, sender) => | 383 port.on("devtools.traceElemHide", (message, sender) => |
381 { | 384 { |
382 logHiddenElements( | 385 logHiddenElements( |
383 sender.page.id, message.selectors, message.filters, | 386 sender.page.id, message.selectors, message.filters, |
384 extractHostFromFrame(sender.frame) | 387 extractHostFromFrame(sender.frame) |
385 ); | 388 ); |
386 }); | 389 }); |
OLD | NEW |