Fixed a bug in exceptions
This commit is contained in:
parent
587b16e107
commit
d488aff7b3
|
@ -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}`);
|
||||||
|
|
Loading…
Reference in New Issue