Fixed redirections not appearing in Brave #253

This commit is contained in:
ManeraKai 2022-05-19 10:39:41 +03:00
parent ba162b6fe4
commit ca9c5e04c0
2 changed files with 4 additions and 3 deletions

View File

@ -23,6 +23,7 @@
"webRequest", "webRequest",
"webRequestBlocking", "webRequestBlocking",
"storage", "storage",
"unlimitedStorage",
"cookies", "cookies",
"contextMenus", "contextMenus",
"<all_urls>" "<all_urls>"

View File

@ -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);