diff options
author | ManeraKai <manerakai@protonmail.com> | 2022-02-27 20:12:23 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2022-02-27 20:12:23 +0300 |
commit | d488aff7b35f13a602bdbfeac98c3f60991fc29e (patch) | |
tree | 3d82e26674df36ef747a4b390c93a0f205731157 | |
parent | Fixed bugs (diff) | |
download | libredirect-d488aff7b35f13a602bdbfeac98c3f60991fc29e.zip |
Fixed a bug in exceptions
-rw-r--r-- | src/pages/background/background.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js index ad1a84d3..1f096b4c 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}`); |