From d488aff7b35f13a602bdbfeac98c3f60991fc29e Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Sun, 27 Feb 2022 20:12:23 +0300 Subject: [PATCH] Fixed a bug in exceptions --- src/pages/background/background.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/background/background.js b/src/pages/background/background.js index ad1a84d..1f096b4 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -49,8 +49,6 @@ browser.webRequest.onBeforeRequest.addListener( var newUrl; - if (exceptionsHelper.isException(url, initiator)) newUrl = null; - if (!newUrl) newUrl = youtubeHelper.redirect(url, details, initiator) if (youtubeMusicHelper.isYoutubeMusic(url, initiator)) newUrl = youtubeMusicHelper.redirect(url, details.type) @@ -75,10 +73,12 @@ browser.webRequest.onBeforeRequest.addListener( if (wikipediaHelper.isWikipedia(url, initiator)) newUrl = wikipediaHelper.redirect(url); if (youtubeHelper.isPipedorInvidious(newUrl ?? url, details.type)) newUrl = youtubeHelper.addUrlParams(newUrl ?? url); - else console.log("isPipedorInvidiousisFalse"); + + if (exceptionsHelper.isException(url, initiator)) newUrl = null; if (bybassTabs.includes(details.tabId)) newUrl = null; + if (newUrl) { if (newUrl == 'CANCEL') { console.log(`Canceled ${url}`);