mirror of https://github.com/gorhill/uBlock.git
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 '';
|
return '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var reNetworkURI = /^(?:ftps?|https?|wss?)/;
|
||||||
|
|
||||||
var normalizeRequestDetails = function(details) {
|
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;
|
var type = details.type;
|
||||||
|
|
||||||
// https://github.com/gorhill/uBlock/issues/1493
|
// https://github.com/gorhill/uBlock/issues/1493
|
||||||
|
|
Loading…
Reference in New Issue