mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-02 09:09:38 +02:00
make use of Chromium 63's webRequest's new property
This commit is contained in:
parent
b22c193cf2
commit
0ba8c33a40
@ -104,7 +104,19 @@ vAPI.net.registerListeners = function() {
|
||||
return '';
|
||||
};
|
||||
|
||||
var reNetworkURI = /^(?:ftps?|https?|wss?)/;
|
||||
|
||||
var normalizeRequestDetails = function(details) {
|
||||
// Chromium 63+ supports the `initiator` property, which contains
|
||||
// the URL of the origin from which the network request was made.
|
||||
if (
|
||||
details.tabId === vAPI.noTabId &&
|
||||
reNetworkURI.test(details.initiator)
|
||||
) {
|
||||
details.tabId = vAPI.anyTabId;
|
||||
details.documentUrl = details.initiator;
|
||||
}
|
||||
|
||||
var type = details.type;
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/1493
|
||||
|
Loading…
Reference in New Issue
Block a user