diff --git a/src/assets/javascripts/helpers/search.js b/src/assets/javascripts/helpers/search.js index 511fc53..9bd9c13 100644 --- a/src/assets/javascripts/helpers/search.js +++ b/src/assets/javascripts/helpers/search.js @@ -79,7 +79,7 @@ function initSearxCookies(test, from) { ...r.searxTorCustomRedirects, ...r.searxI2pRedirectsChecks, ...r.searxI2pCustomRedirects, - ].includes(protocolHost)) return; + ].includes(protocolHost)) { resolve(); return; } if (!test) { let checkedInstances; @@ -125,7 +125,7 @@ function setSearxCookies() { "searxTorCustomRedirects", ], r => { - if (r.disableSearch || r.searchFrontend != 'searx', r.searchProtocol === undefined) { resolve(); return; } + if (r.disableSearch || r.searchFrontend != 'searx') { resolve(); return; } let checkedInstances; if (r.searchProtocol == 'normal') checkedInstances = [...r.searxNormalRedirectsChecks, ...r.searxNormalCustomRedirects] else if (r.searchProtocol == 'tor') checkedInstances = [...r.searxTorRedirectsChecks, ...r.searxTorCustomRedirects] @@ -175,7 +175,7 @@ function initSearxngCookies(test, from) { ...r.searxngTorCustomRedirects, ...r.searxngI2pRedirectsChecks, ...r.searxngI2pCustomRedirects, - ].includes(protocolHost)) return; + ].includes(protocolHost)) { resolve(); return; } if (!test) { let checkedInstances; diff --git a/src/assets/javascripts/helpers/translate/translate.js b/src/assets/javascripts/helpers/translate/translate.js index 7ad1f33..996f0ee 100644 --- a/src/assets/javascripts/helpers/translate/translate.js +++ b/src/assets/javascripts/helpers/translate/translate.js @@ -126,14 +126,11 @@ function initSimplyTranslateCookies(test, from) { ...r.simplyTranslateNormalCustomRedirects, ...r.simplyTranslateTorRedirectsChecks, ...r.simplyTranslateTorCustomRedirects, - ...r.simplyTranslateI2pRedirectsChecks, - ...r.simplyTranslateI2pCustomRedirects, ].includes(protocolHost)) { resolve(); return; } if (!test) { let checkedInstances; if (r.translateProtocol == 'normal') checkedInstances = [...r.simplyTranslateNormalRedirectsChecks, ...r.simplyTranslateNormalCustomRedirects] else if (r.translateProtocol == 'tor') checkedInstances = [...r.simplyTranslateTorRedirectsChecks, ...r.simplyTranslateTorCustomRedirects] - else if (r.translateProtocol == 'i2p') checkedInstances = [...r.simplyTranslateI2pRedirectsChecks, ...r.simplyTranslateI2pCustomRedirects] for (const to of checkedInstances) { utils.copyCookie('simplyTranslate', from, to, 'from_lang'); utils.copyCookie('simplyTranslate', from, to, 'to_lang'); diff --git a/src/pages/background/background.js b/src/pages/background/background.js index 9eedc30..5a6dc82 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -85,8 +85,8 @@ browser.webRequest.onBeforeRequest.addListener( else if (details.initiator) initiator = new URL(details.initiator); - let newUrl = await youtubeHelper.redirect(url, details, initiator) - if (!newUrl) newUrl = await youtubeMusicHelper.redirect(url, details.type) + let newUrl = await youtubeMusicHelper.redirect(url, details.type) + if (!newUrl) newUrl = await youtubeHelper.redirect(url, details, initiator) if (!newUrl) newUrl = await twitterHelper.redirect(url, initiator); if (!newUrl) newUrl = await instagramHelper.redirect(url, details.type, initiator); if (!newUrl) newUrl = await mapsHelper.redirect(url, initiator); diff --git a/src/pages/options/general/general.html b/src/pages/options/general/general.html index 8239f7c..8dd6018 100644 --- a/src/pages/options/general/general.html +++ b/src/pages/options/general/general.html @@ -54,6 +54,10 @@
+
+

General

+
+

Theme

-
diff --git a/src/pages/options/general/general.pug b/src/pages/options/general/general.pug index 0cef802..3d35c31 100644 --- a/src/pages/options/general/general.pug +++ b/src/pages/options/general/general.pug @@ -7,6 +7,10 @@ body.option(dir="auto") +links('general') section.option-block + .some-block.option-block + h1 General + hr + .some-block.option-block h4(data-localise="__MSG_theme__") Theme select#theme @@ -167,9 +171,6 @@ body.option(dir="auto") |Send Files input#sendTargets(type="checkbox") - hr - - script(type="module" src="../init.js") script(type="module" src="./general.js") script(type="module" src="../../../assets/javascripts/localise.js") \ No newline at end of file diff --git a/src/pages/options/imgur/imgur.html b/src/pages/options/imgur/imgur.html index 6194fbb..78730ed 100644 --- a/src/pages/options/imgur/imgur.html +++ b/src/pages/options/imgur/imgur.html @@ -5,7 +5,7 @@ - General + Imgur @@ -55,6 +55,10 @@
+
+

Imgur

+
+

Enable

diff --git a/src/pages/options/imgur/imgur.pug b/src/pages/options/imgur/imgur.pug index f195ca6..3dacdec 100644 --- a/src/pages/options/imgur/imgur.pug +++ b/src/pages/options/imgur/imgur.pug @@ -1,13 +1,17 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Imgur script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('imgur') section.option-block + .some-block.option-block + h1 Imgur + hr + .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-imgur(type="checkbox") diff --git a/src/pages/options/instagram/instagram.html b/src/pages/options/instagram/instagram.html index dfb5872..2524f90 100644 --- a/src/pages/options/instagram/instagram.html +++ b/src/pages/options/instagram/instagram.html @@ -5,7 +5,7 @@ - General + Instagram @@ -55,6 +55,10 @@
+
+

Instagram

+
+

Enable

diff --git a/src/pages/options/instagram/instagram.pug b/src/pages/options/instagram/instagram.pug index 6e1ef19..6acc2c6 100644 --- a/src/pages/options/instagram/instagram.pug +++ b/src/pages/options/instagram/instagram.pug @@ -1,13 +1,17 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Instagram script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('instagram') section.option-block + .some-block.option-block + h1 Instagram + hr + .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-bibliogram(type="checkbox") diff --git a/src/pages/options/lbry/lbry.html b/src/pages/options/lbry/lbry.html index 3802a14..4c24239 100644 --- a/src/pages/options/lbry/lbry.html +++ b/src/pages/options/lbry/lbry.html @@ -5,7 +5,7 @@ - General + LBRY/Odysee @@ -55,6 +55,10 @@
+
+

LBRY/Odysee

+
+

Enable

diff --git a/src/pages/options/lbry/lbry.pug b/src/pages/options/lbry/lbry.pug index aca0d48..e579de3 100644 --- a/src/pages/options/lbry/lbry.pug +++ b/src/pages/options/lbry/lbry.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title LBRY/Odysee script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('lbry') section.option-block + .some-block.option-block + h1 LBRY/Odysee + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-lbry(type="checkbox") diff --git a/src/pages/options/maps/maps.html b/src/pages/options/maps/maps.html index af7d072..596289b 100644 --- a/src/pages/options/maps/maps.html +++ b/src/pages/options/maps/maps.html @@ -5,7 +5,7 @@ - General + Maps @@ -55,6 +55,10 @@
+
+

Maps

+
+

Enable

diff --git a/src/pages/options/maps/maps.pug b/src/pages/options/maps/maps.pug index 2da94a4..ab51f87 100644 --- a/src/pages/options/maps/maps.pug +++ b/src/pages/options/maps/maps.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Maps script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('maps') section.option-block + .some-block.option-block + h1 Maps + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-osm(type="checkbox") diff --git a/src/pages/options/medium/medium.html b/src/pages/options/medium/medium.html index 87aff72..cf9bab8 100644 --- a/src/pages/options/medium/medium.html +++ b/src/pages/options/medium/medium.html @@ -5,7 +5,7 @@ - General + Medium @@ -55,6 +55,10 @@
+
+

Medium

+
+

Enable

diff --git a/src/pages/options/medium/medium.pug b/src/pages/options/medium/medium.pug index f5b698d..eb640c4 100644 --- a/src/pages/options/medium/medium.pug +++ b/src/pages/options/medium/medium.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Medium script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('medium') section.option-block + .some-block.option-block + h1 Medium + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-medium(type="checkbox") diff --git a/src/pages/options/peertube/peertube.html b/src/pages/options/peertube/peertube.html index 1ddc26a..384c90b 100644 --- a/src/pages/options/peertube/peertube.html +++ b/src/pages/options/peertube/peertube.html @@ -5,7 +5,7 @@ - General + PeerTube @@ -55,6 +55,10 @@
+
+

PeerTube

+
+

Enable

diff --git a/src/pages/options/peertube/peertube.pug b/src/pages/options/peertube/peertube.pug index d9b25bb..a30be4d 100644 --- a/src/pages/options/peertube/peertube.pug +++ b/src/pages/options/peertube/peertube.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title PeerTube script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('peertube') section.option-block + .some-block.option-block + h1 PeerTube + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-peertube(type="checkbox") diff --git a/src/pages/options/reddit/reddit.html b/src/pages/options/reddit/reddit.html index 754314e..20a26f6 100644 --- a/src/pages/options/reddit/reddit.html +++ b/src/pages/options/reddit/reddit.html @@ -5,7 +5,7 @@ - General + Reddit @@ -55,6 +55,10 @@
+
+

Reddit

+
+

Enable

diff --git a/src/pages/options/reddit/reddit.pug b/src/pages/options/reddit/reddit.pug index ba23df8..c522af2 100644 --- a/src/pages/options/reddit/reddit.pug +++ b/src/pages/options/reddit/reddit.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Reddit script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('reddit') section.option-block + .some-block.option-block + h1 Reddit + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-reddit(type="checkbox") diff --git a/src/pages/options/search/search.html b/src/pages/options/search/search.html index 8b22e43..e7107d7 100644 --- a/src/pages/options/search/search.html +++ b/src/pages/options/search/search.html @@ -5,7 +5,7 @@ - General + Search @@ -55,6 +55,10 @@
+
+

Search

+
+

Enable

diff --git a/src/pages/options/search/search.pug b/src/pages/options/search/search.pug index 3bdc6d7..a900124 100644 --- a/src/pages/options/search/search.pug +++ b/src/pages/options/search/search.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Search script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('search') section.option-block + .some-block.option-block + h1 Search + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-search(type="checkbox") diff --git a/src/pages/options/sendTargets/sendTargets.html b/src/pages/options/sendTargets/sendTargets.html index f372b3b..f9f72ef 100644 --- a/src/pages/options/sendTargets/sendTargets.html +++ b/src/pages/options/sendTargets/sendTargets.html @@ -5,7 +5,7 @@ - General + Send Files @@ -55,6 +55,10 @@
+
+

Send Files

+
+

Enable

diff --git a/src/pages/options/sendTargets/sendTargets.pug b/src/pages/options/sendTargets/sendTargets.pug index 3017fa8..027aee7 100644 --- a/src/pages/options/sendTargets/sendTargets.pug +++ b/src/pages/options/sendTargets/sendTargets.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Send Files script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('sendTargets') section.option-block + .some-block.option-block + h1 Send Files + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-sendTargets(type="checkbox") diff --git a/src/pages/options/tiktok/tiktok.html b/src/pages/options/tiktok/tiktok.html index 89a14ba..b4fb1d2 100644 --- a/src/pages/options/tiktok/tiktok.html +++ b/src/pages/options/tiktok/tiktok.html @@ -5,7 +5,7 @@ - General + TikTok @@ -55,6 +55,10 @@
+
+

TikTok

+
+

Enable

diff --git a/src/pages/options/tiktok/tiktok.pug b/src/pages/options/tiktok/tiktok.pug index 528f6ae..db765c4 100644 --- a/src/pages/options/tiktok/tiktok.pug +++ b/src/pages/options/tiktok/tiktok.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title TikTok script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('tiktok') section.option-block + .some-block.option-block + h1 TikTok + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-tiktok(type="checkbox") diff --git a/src/pages/options/translate/translate.html b/src/pages/options/translate/translate.html index c62ea5a..879917b 100644 --- a/src/pages/options/translate/translate.html +++ b/src/pages/options/translate/translate.html @@ -5,7 +5,7 @@ - General + Translate @@ -55,6 +55,10 @@
+
+

Translate

+
+

Enable

diff --git a/src/pages/options/translate/translate.pug b/src/pages/options/translate/translate.pug index 42afcdf..a1689e2 100644 --- a/src/pages/options/translate/translate.pug +++ b/src/pages/options/translate/translate.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Translate script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('translate') section.option-block + .some-block.option-block + h1 Translate + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-simplyTranslate(type="checkbox") diff --git a/src/pages/options/twitter/twitter.html b/src/pages/options/twitter/twitter.html index 2a477e6..384ba9d 100644 --- a/src/pages/options/twitter/twitter.html +++ b/src/pages/options/twitter/twitter.html @@ -5,7 +5,7 @@ - General + Twitter @@ -55,6 +55,10 @@
+
+

Twitter

+
+

Enable

diff --git a/src/pages/options/twitter/twitter.pug b/src/pages/options/twitter/twitter.pug index 517a272..092c3e4 100644 --- a/src/pages/options/twitter/twitter.pug +++ b/src/pages/options/twitter/twitter.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title General + title Twitter script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('twitter') section.option-block + .some-block.option-block + h1 Twitter + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-nitter(type="checkbox") diff --git a/src/pages/options/wikipedia/wikipedia.html b/src/pages/options/wikipedia/wikipedia.html index ba22bc3..fe735ac 100644 --- a/src/pages/options/wikipedia/wikipedia.html +++ b/src/pages/options/wikipedia/wikipedia.html @@ -55,6 +55,10 @@
+
+

Wikipedia

+
+

Enable

diff --git a/src/pages/options/wikipedia/wikipedia.pug b/src/pages/options/wikipedia/wikipedia.pug index 54ca873..d08431d 100644 --- a/src/pages/options/wikipedia/wikipedia.pug +++ b/src/pages/options/wikipedia/wikipedia.pug @@ -8,6 +8,9 @@ body.option(dir="auto") +links('wikipedia') section.option-block + .some-block.option-block + h1 Wikipedia + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-wikipedia(type="checkbox") diff --git a/src/pages/options/youtube/youtube.html b/src/pages/options/youtube/youtube.html index 6a2036a..2938ccd 100644 --- a/src/pages/options/youtube/youtube.html +++ b/src/pages/options/youtube/youtube.html @@ -5,7 +5,7 @@ - Document + YouTube @@ -55,6 +55,10 @@
+
+

YouTube

+
+

Enable

diff --git a/src/pages/options/youtube/youtube.pug b/src/pages/options/youtube/youtube.pug index 39235b0..6d5d246 100644 --- a/src/pages/options/youtube/youtube.pug +++ b/src/pages/options/youtube/youtube.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title Document + title YouTube script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('youtube') section.option-block + .some-block.option-block + h1 YouTube + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-invidious(type="checkbox") diff --git a/src/pages/options/youtubeMusic/youtubeMusic.html b/src/pages/options/youtubeMusic/youtubeMusic.html index 845ec44..b77a2a8 100644 --- a/src/pages/options/youtubeMusic/youtubeMusic.html +++ b/src/pages/options/youtubeMusic/youtubeMusic.html @@ -5,7 +5,7 @@ - Document + YouTube Music @@ -55,6 +55,10 @@
+
+

YouTube Music

+
+

Enable

diff --git a/src/pages/options/youtubeMusic/youtubeMusic.pug b/src/pages/options/youtubeMusic/youtubeMusic.pug index 10d2dee..ad3271d 100644 --- a/src/pages/options/youtubeMusic/youtubeMusic.pug +++ b/src/pages/options/youtubeMusic/youtubeMusic.pug @@ -1,13 +1,16 @@ doctype html html(lang="en") include ../../widgets/head.pug - title Document + title YouTube Music script(type="module" src="../../../assets/javascripts/localise.js") body.option(dir="auto") include ../../widgets/links.pug +links('youtubeMusic') section.option-block + .some-block.option-block + h1 YouTube Music + hr .some-block.option-block h4(data-localise="__MSG_enable__") Enable input#disable-beatbump(type="checkbox") diff --git a/src/pages/popup/popup.html b/src/pages/popup/popup.html index ffc1c86..3eb6ba1 100644 --- a/src/pages/popup/popup.html +++ b/src/pages/popup/popup.html @@ -48,11 +48,11 @@

Medium

-
+ -
+ @@ -108,6 +108,5 @@
- \ No newline at end of file diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js index 824f178..58d45d6 100644 --- a/src/pages/popup/popup.js +++ b/src/pages/popup/popup.js @@ -94,6 +94,7 @@ utils.unify(true).then(r => { if (!r) document.getElementById('unify_div').style.display = 'none'; else { const unify = document.getElementById('unify'); + console.log('addlistner'); unify.addEventListener("click", () => utils.unify(false, unify)); } }) diff --git a/src/pages/popup/popup.pug b/src/pages/popup/popup.pug index 5e067f3..94f65ea 100644 --- a/src/pages/popup/popup.pug +++ b/src/pages/popup/popup.pug @@ -63,13 +63,13 @@ html(lang="en") input#disable-medium(type="checkbox") #peertube.some-block - a.title(href="https://peertube.com") + a.title(href="https://search.joinpeertube.org") img(src="../../assets/images/peertube-icon.svg") h4 PeerTube input#disable-peertube(type="checkbox") #lbry.some-block - a.title(href="https://lbry.com") + a.title(href="https://odysee.com/") img(src="../../assets/images/lbry-icon.png") h4 LBRY input#disable-lbry(type="checkbox") @@ -124,4 +124,4 @@ html(lang="en") script(type="module" src="../options/init.js") script(type="module" src="./popup.js") - script(src="../../assets/javascripts/localise.js") \ No newline at end of file + //- script(src="../../assets/javascripts/localise.js") \ No newline at end of file diff --git a/src/pages/stylesheets/styles.css b/src/pages/stylesheets/styles.css index 4421aa8..f4027c2 100644 --- a/src/pages/stylesheets/styles.css +++ b/src/pages/stylesheets/styles.css @@ -211,7 +211,7 @@ div.option-block h4 { div.option-block h1 { margin: 0; font-size: 28px; - color: var(--active); + color: var(--text); } div.option-block div {