Fixed redirections not appearing in Brave #253
This commit is contained in:
parent
ba162b6fe4
commit
ca9c5e04c0
|
@ -23,6 +23,7 @@
|
||||||
"webRequest",
|
"webRequest",
|
||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"storage",
|
"storage",
|
||||||
|
"unlimitedStorage",
|
||||||
"cookies",
|
"cookies",
|
||||||
"contextMenus",
|
"contextMenus",
|
||||||
"<all_urls>"
|
"<all_urls>"
|
||||||
|
|
|
@ -78,9 +78,9 @@ let BYPASSTABs = [];
|
||||||
|
|
||||||
browser.webRequest.onBeforeRequest.addListener(
|
browser.webRequest.onBeforeRequest.addListener(
|
||||||
async details => {
|
async details => {
|
||||||
await wholeInit();
|
|
||||||
const url = new URL(details.url);
|
const url = new URL(details.url);
|
||||||
// console.info("url:", url.href, "type:", details.type);
|
if (new RegExp(/^chrome-extension:\/{2}.*\/instances\/(blocklist|data).json$/).test(url.href) && details.type == 'xmlhttprequest') return;
|
||||||
|
await wholeInit();
|
||||||
let initiator;
|
let initiator;
|
||||||
if (details.originUrl)
|
if (details.originUrl)
|
||||||
initiator = new URL(details.originUrl);
|
initiator = new URL(details.originUrl);
|
||||||
|
|
Loading…
Reference in New Issue