Fixed a bug in exceptions

This commit is contained in:
ManeraKai 2022-02-27 20:12:23 +03:00
parent 587b16e107
commit d488aff7b3
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 3 additions and 3 deletions

View File

@ -49,8 +49,6 @@ browser.webRequest.onBeforeRequest.addListener(
var newUrl; var newUrl;
if (exceptionsHelper.isException(url, initiator)) newUrl = null;
if (!newUrl) newUrl = youtubeHelper.redirect(url, details, initiator) if (!newUrl) newUrl = youtubeHelper.redirect(url, details, initiator)
if (youtubeMusicHelper.isYoutubeMusic(url, initiator)) newUrl = youtubeMusicHelper.redirect(url, details.type) 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 (wikipediaHelper.isWikipedia(url, initiator)) newUrl = wikipediaHelper.redirect(url);
if (youtubeHelper.isPipedorInvidious(newUrl ?? url, details.type)) newUrl = youtubeHelper.addUrlParams(newUrl ?? 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 (bybassTabs.includes(details.tabId)) newUrl = null;
if (newUrl) { if (newUrl) {
if (newUrl == 'CANCEL') { if (newUrl == 'CANCEL') {
console.log(`Canceled ${url}`); console.log(`Canceled ${url}`);