diff options
author | ManeraKai <manerakai@protonmail.com> | 2022-04-18 10:25:50 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2022-04-18 10:25:50 +0300 |
commit | b657b1ae2ba818432fa001b07ed40e04348bb011 (patch) | |
tree | 62954fb50254dee46fc7cf9361025654ac5313a8 /src | |
parent | Opening the offline redirection page if redirection failed 5 times #201 (diff) | |
download | libredirect-b657b1ae2ba818432fa001b07ed40e04348bb011.zip |
Adding Raw Link Copy feature #165
Diffstat (limited to 'src')
28 files changed, 426 insertions, 239 deletions
diff --git a/src/assets/javascripts/helpers/imgur.js b/src/assets/javascripts/helpers/imgur.js index 20d7c5b3..a376e404 100644 --- a/src/assets/javascripts/helpers/imgur.js +++ b/src/assets/javascripts/helpers/imgur.js @@ -8,7 +8,7 @@ let redirects = { "rimgo": { "normal": [], "tor": [], - "i2p": [] + "i2p": [] } } const getRedirects = () => redirects; @@ -17,7 +17,7 @@ const getCustomRedirects = function () { "rimgo": { "normal": [...rimgoNormalRedirectsChecks, ...rimgoNormalCustomRedirects], "tor": [...rimgoTorRedirectsChecks, ...rimgoTorCustomRedirects], - "i2p": [...rimgoI2pRedirectsChecks, ...rimgoI2pCustomRedirects] + "i2p": [...rimgoI2pRedirectsChecks, ...rimgoI2pCustomRedirects] }, }; }; @@ -41,10 +41,10 @@ function setRedirects(val) { setRimgoTorRedirectsChecks(rimgoTorRedirectsChecks); for (const item of rimgoI2pRedirectsChecks) - if (!redirects.rimgo.i2p.includes(item)) { - var index = rimgoI2pRedirectsChecks.indexOf(item); - if (index !== -1) rimgoI2pRedirectsChecks.splice(index, 1); - } + if (!redirects.rimgo.i2p.includes(item)) { + var index = rimgoI2pRedirectsChecks.indexOf(item); + if (index !== -1) rimgoI2pRedirectsChecks.splice(index, 1); + } setRimgoI2pRedirectsChecks(rimgoI2pRedirectsChecks); } @@ -149,17 +149,30 @@ function redirect(url, type) { return `${randomInstance}${url.pathname}${url.search}`; } +function reverse(url) { + let protocolHost = commonHelper.protocolHost(url); + if ( + ![...redirects.rimgo.normal, + ...redirects.rimgo.tor, + ...redirects.rimgo.i2p, + ...rimgoNormalCustomRedirects, + ...rimgoTorCustomRedirects, + ...rimgoI2pCustomRedirects].includes(protocolHost) + ) return; + return `https://imgur.com${url.pathname}${url.search}`; +} + function switchInstance(url) { let protocolHost = commonHelper.protocolHost(url); let imgurList = [ ...redirects.rimgo.normal, ...redirects.rimgo.tor, - ...redirects.rimgo.i2p, + ...redirects.rimgo.i2p, ...rimgoNormalCustomRedirects, ...rimgoTorCustomRedirects, - ...rimgoI2pCustomRedirects, + ...rimgoI2pCustomRedirects, ]; if (!imgurList.includes(protocolHost)) return null; @@ -193,12 +206,12 @@ async function init() { "rimgoNormalCustomRedirects", "rimgoTorRedirectsChecks", "rimgoTorCustomRedirects", - "rimgoI2pRedirectsChecks", - "rimgoI2pCustomRedirects", + "rimgoI2pRedirectsChecks", + "rimgoI2pCustomRedirects", "imgurProtocol", ], - r => { + r => { disable = r.disableImgur ?? false; protocol = r.imgurProtocol ?? "normal"; @@ -212,8 +225,8 @@ async function init() { rimgoTorRedirectsChecks = r.rimgoTorRedirectsChecks ?? [...redirects.rimgo.tor]; rimgoTorCustomRedirects = r.rimgoTorCustomRedirects ?? []; - rimgoI2pRedirectsChecks = r.rimgoI2pRedirectsChecks ?? [...redirects.rimgo.i2p]; - rimgoI2pCustomRedirects = r.rimgoI2pCustomRedirects ?? []; + rimgoI2pRedirectsChecks = r.rimgoI2pRedirectsChecks ?? [...redirects.rimgo.i2p]; + rimgoI2pCustomRedirects = r.rimgoI2pCustomRedirects ?? []; resolve(); } @@ -230,6 +243,7 @@ export default { getDisable, setDisable, + getProtocol, setProtocol, @@ -248,6 +262,7 @@ export default { setRimgoI2pCustomRedirects, redirect, + reverse, isImgur, init, switchInstance, diff --git a/src/assets/javascripts/helpers/instagram.js b/src/assets/javascripts/helpers/instagram.js index d151dc6b..3528575d 100644 --- a/src/assets/javascripts/helpers/instagram.js +++ b/src/assets/javascripts/helpers/instagram.js @@ -121,6 +121,23 @@ function redirect(url, type, initiator) { return `${randomInstance}/u${url.pathname}${url.search}`; // Likely a user profile, redirect to '/u/...' } +function reverse(url) { + let protocolHost = commonHelper.protocolHost(url); + if ( + ![...redirects.bibliogram.normal, + ...redirects.bibliogram.tor, + ...bibliogramNormalCustomRedirects, + ...bibliogramTorCustomRedirects].includes(protocolHost) + ) return; + if (url.pathname.startsWith('/p')) + return `https://instagram.com${url.pathname.replace('/p', '')}${url.search}`; + + if (url.pathname.startsWith('/u')) + return `https://instagram.com${url.pathname.replace('/u', '')}${url.search}`; + + return `https://instagram.com${url.pathname}${url.search}`; +} + function switchInstance(url) { let protocolHost = commonHelper.protocolHost(url); @@ -249,6 +266,8 @@ export default { getDisable, setDisable, + reverse, + getProtocol, setProtocol, diff --git a/src/assets/javascripts/helpers/reddit.js b/src/assets/javascripts/helpers/reddit.js index 77a77d43..9d427c2e 100644 --- a/src/assets/javascripts/helpers/reddit.js +++ b/src/assets/javascripts/helpers/reddit.js @@ -366,6 +366,18 @@ function redirect(url, type, initiator) { } } +function reverse(url) { + let protocolHost = commonHelper.protocolHost(url); + if ( + ![...redirects.nitter.normal, + ...redirects.nitter.tor, + ...nitterNormalCustomRedirects, + ...nitterTorCustomRedirects].includes(protocolHost) + ) return; + if(url.pathname.includes('/pics/w:null_')) + return `https://reddit.com${url.pathname}${url.search}`; +} + function switchInstance(url) { let protocolHost = commonHelper.protocolHost(url); diff --git a/src/assets/javascripts/helpers/tiktok.js b/src/assets/javascripts/helpers/tiktok.js index 905cf3ec..44f46ba8 100644 --- a/src/assets/javascripts/helpers/tiktok.js +++ b/src/assets/javascripts/helpers/tiktok.js @@ -95,8 +95,10 @@ function isTiktok(url, initiator) { } function redirect(url, type) { - // https://www.tiktok.com/@keysikaspol/video/7061265241887345946 + // https://www.tiktok.com/@keysikaspol/video/7061265241887345946?for_redirection=@keysikaspol + // https://proxitok.pussthecat.org/video/7061265241887345946 // https://www.tiktok.com/@keysikaspol + // https://proxitok.herokuapp.com/video/7061265241887345946 if (type != "main_frame") return null; @@ -106,11 +108,23 @@ function redirect(url, type) { if (instancesList.length === 0) return null; let randomInstance = commonHelper.getRandomInstance(instancesList); - let pathName = url.pathname.replace(new RegExp(/@.*\/(?=video)/), ""); + let pathName = url.pathname.replace(/@.*\/(?=video)/, ""); return `${randomInstance}${pathName}`; } +function reverse(url) { + let protocolHost = commonHelper.protocolHost(url); + if ( + ![...redirects.proxiTok.normal, + ...redirects.proxiTok.tor, + ...proxiTokNormalCustomRedirects, + ...proxiTokTorCustomRedirects].includes(protocolHost) + ) return; + + return `https://tiktok.com${url.pathname}${url.search}`; +} + async function init() { return new Promise(resolve => { fetch('/instances/data.json').then(response => response.text()).then(data => { @@ -129,7 +143,7 @@ async function init() { "tiktokProtocol" ], r => { - redirects.proxiTok = dataJson.proxiTok; + redirects.proxiTok = dataJson.proxiTok; disable = r.disableTiktok ?? false; protocol = r.tiktokProtocol ?? "normal"; @@ -158,6 +172,8 @@ export default { getDisable, setDisable, + reverse, + getProtocol, setProtocol, diff --git a/src/assets/javascripts/helpers/twitter.js b/src/assets/javascripts/helpers/twitter.js index e58af78b..ddcfe19a 100644 --- a/src/assets/javascripts/helpers/twitter.js +++ b/src/assets/javascripts/helpers/twitter.js @@ -208,6 +208,7 @@ function redirect(url, initiator) { if (instancesList.length === 0) return null; let randomInstance = commonHelper.getRandomInstance(instancesList) + // https://pbs.twimg.com/profile_images/648888480974508032/66_cUYfj_400x400.jpg if (url.host.split(".")[0] === "pbs" || url.host.split(".")[0] === "video") return `${randomInstance}/pic/${encodeURIComponent(url.href)}`; @@ -219,6 +220,17 @@ function redirect(url, initiator) { return `${randomInstance}${url.pathname}${url.search}`; } +function reverse(url) { + let protocolHost = commonHelper.protocolHost(url); + if ( + ![...redirects.nitter.normal, + ...redirects.nitter.tor, + ...nitterNormalCustomRedirects, + ...nitterTorCustomRedirects].includes(protocolHost) + ) return; + return `https://twitter.com${url.pathname}${url.search}`; +} + function switchInstance(url) { let protocolHost = commonHelper.protocolHost(url); @@ -451,6 +463,8 @@ export default { getDisable, setDisable, + reverse, + getEnableCustomSettings, setEnableCustomSettings, diff --git a/src/assets/javascripts/helpers/youtube/youtube.js b/src/assets/javascripts/helpers/youtube/youtube.js index 4574d6e5..a0b0bfcb 100644 --- a/src/assets/javascripts/helpers/youtube/youtube.js +++ b/src/assets/javascripts/helpers/youtube/youtube.js @@ -371,6 +371,23 @@ function redirect(url, details, initiator) { return 'CANCEL'; } +function reverse(url) { + let protocolHost = commonHelper.protocolHost(url); + + if (![ + ...redirects.invidious.normal, + ...redirects.invidious.tor, + ...invidiousNormalCustomRedirects, + ...invidiousTorCustomRedirects, + ...redirects.piped.normal, + ...redirects.piped.tor, + ...pipedNormalCustomRedirects, + ...pipedTorCustomRedirects, + ].includes(protocolHost)) return; + + return `https://youtube.com${url.pathname}${url.search}`; +} + function switchInstance(url) { let protocolHost = commonHelper.protocolHost(url); if ( @@ -658,6 +675,8 @@ export default { getDisable, setDisable, + reverse, + getEnableCustomSettings, getProtocol, getOnlyEmbeddedVideo, diff --git a/src/pages/options/imgur/imgur.html b/src/pages/options/imgur/imgur.html index c9d48622..a97c1c28 100644 --- a/src/pages/options/imgur/imgur.html +++ b/src/pages/options/imgur/imgur.html @@ -84,10 +84,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://rimgo.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -111,10 +112,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://rimgo.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -131,10 +133,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://rimgo.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/instagram/instagram.html b/src/pages/options/instagram/instagram.html index 01556fd8..bc52cd3b 100644 --- a/src/pages/options/instagram/instagram.html +++ b/src/pages/options/instagram/instagram.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://bibliogram.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://bibliogram.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/lbry/lbry.html b/src/pages/options/lbry/lbry.html index 074ae4b3..d5d459f7 100644 --- a/src/pages/options/lbry/lbry.html +++ b/src/pages/options/lbry/lbry.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://librarian.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://librarian.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/maps/maps.html b/src/pages/options/maps/maps.html index d7c551b6..d4288761 100644 --- a/src/pages/options/maps/maps.html +++ b/src/pages/options/maps/maps.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://facilmap.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/medium/medium.html b/src/pages/options/medium/medium.html index 193dbbb8..303524f7 100644 --- a/src/pages/options/medium/medium.html +++ b/src/pages/options/medium/medium.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://scribe.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://scribe.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/peertube/peertube.html b/src/pages/options/peertube/peertube.html index 5ebff097..dd034bed 100644 --- a/src/pages/options/peertube/peertube.html +++ b/src/pages/options/peertube/peertube.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://simpleertube.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://simpleertube.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/pixiv/pixiv.html b/src/pages/options/pixiv/pixiv.html index 36825094..7adbcf2c 100644 --- a/src/pages/options/pixiv/pixiv.html +++ b/src/pages/options/pixiv/pixiv.html @@ -91,10 +91,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://pixivMoe.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -118,10 +119,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://pixivMoe.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/reddit/reddit.html b/src/pages/options/reddit/reddit.html index 2ded8094..80aa77c5 100644 --- a/src/pages/options/reddit/reddit.html +++ b/src/pages/options/reddit/reddit.html @@ -96,10 +96,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://libreddit.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -123,10 +124,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://libreddit.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -146,10 +148,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://teddit.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -173,10 +176,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://teddit.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/search/search.html b/src/pages/options/search/search.html index 622c0799..01e8511e 100644 --- a/src/pages/options/search/search.html +++ b/src/pages/options/search/search.html @@ -98,10 +98,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://searx.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -125,10 +126,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://searx.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -145,10 +147,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://searx.i2p" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -168,10 +171,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://searxng.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -195,10 +199,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://searxng.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -215,10 +220,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://searxng.i2p" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -238,10 +244,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://whoogle.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -265,10 +272,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://whoogle.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -285,10 +293,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://whoogle.i2p" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/sendTargets/sendTargets.html b/src/pages/options/sendTargets/sendTargets.html index d514b8f0..c54c1582 100644 --- a/src/pages/options/sendTargets/sendTargets.html +++ b/src/pages/options/sendTargets/sendTargets.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://send.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://send.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/speedtest/speedtest.html b/src/pages/options/speedtest/speedtest.html index 50a195e2..5ac5cdaa 100644 --- a/src/pages/options/speedtest/speedtest.html +++ b/src/pages/options/speedtest/speedtest.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://librespeed.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://librespeed.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/spotify/spotify.html b/src/pages/options/spotify/spotify.html index cfcf34b3..0496875a 100644 --- a/src/pages/options/spotify/spotify.html +++ b/src/pages/options/spotify/spotify.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://soju.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://soju.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/tiktok/tiktok.html b/src/pages/options/tiktok/tiktok.html index 52b09bbb..67fc2488 100644 --- a/src/pages/options/tiktok/tiktok.html +++ b/src/pages/options/tiktok/tiktok.html @@ -83,10 +83,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://proxitok.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -110,10 +111,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://proxitok.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/translate/translate.html b/src/pages/options/translate/translate.html index 53436c91..8f63ace9 100644 --- a/src/pages/options/translate/translate.html +++ b/src/pages/options/translate/translate.html @@ -327,10 +327,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://simplytranslate.org" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -354,10 +355,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="http://hxecvvetgrznmprg.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -376,10 +378,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://lingvatranslate.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -403,10 +406,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="http://tyzxppdeoojdnaux.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/twitter/twitter.html b/src/pages/options/twitter/twitter.html index 6d8e0e6f..d7b14abf 100644 --- a/src/pages/options/twitter/twitter.html +++ b/src/pages/options/twitter/twitter.html @@ -165,10 +165,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://nitter.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -192,10 +193,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://nitter.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -212,10 +214,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://nitter.i2p" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/wikipedia/wikipedia.html b/src/pages/options/wikipedia/wikipedia.html index b7fcc40a..246c269b 100644 --- a/src/pages/options/wikipedia/wikipedia.html +++ b/src/pages/options/wikipedia/wikipedia.html @@ -84,10 +84,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://wikiless.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -111,10 +112,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://wikiless.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -131,10 +133,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://wikiless.i2p" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/youtube/youtube.html b/src/pages/options/youtube/youtube.html index 67c86786..569e7f12 100644 --- a/src/pages/options/youtube/youtube.html +++ b/src/pages/options/youtube/youtube.html @@ -779,10 +779,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://invidious.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -806,10 +807,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://invidious.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -1146,10 +1148,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://piped.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -1173,10 +1176,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://piped.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -1257,10 +1261,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://piped-material.com" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> @@ -1284,10 +1289,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://piped-material.onion" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/options/youtubeMusic/youtubeMusic.html b/src/pages/options/youtubeMusic/youtubeMusic.html index eae611d6..9286ed64 100644 --- a/src/pages/options/youtubeMusic/youtubeMusic.html +++ b/src/pages/options/youtubeMusic/youtubeMusic.html @@ -76,10 +76,11 @@ <form class="custom-instance-form"> <div class="some-block option-block"> <input class="custom-instance" placeholder="https://beatbump.wewe" type="url"> - <button class="add add-instance" type="submit"></button> - <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> - <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> - </svg> + <button class="add add-instance" type="submit"> + <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path> + </svg> + </button> </div> </form> <div class="checklist custom-checklist"></div> diff --git a/src/pages/popup/popup.html b/src/pages/popup/popup.html index 2f83116c..2c4f76d5 100644 --- a/src/pages/popup/popup.html +++ b/src/pages/popup/popup.html @@ -169,26 +169,32 @@ <div class="buttons-popup"> <a class="button" id="change-instance"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <svg xmlns="http://www.w3.org/2000/svg" height="26px" viewBox="0 0 24 24" width="26px" fill="currentColor"> <path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z" /> </svg> <x data-localise="__MSG_instance__">Instance</x> </a> <a class="button" id="more-options"> - <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" - width="24px" fill="currentColor"> + <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="26px" viewBox="0 0 24 24" + width="26px" fill="currentColor"> <path d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" /> </svg> <x data-localise="__MSG_settings__">Settings</x> </a> + <a class="button" id="copy_raw"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path + d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" /> + </svg> + <x data-localise="__MSG_copyRaw__">Copy Raw</x> + </a> </div> - <script type="module" src="../options/init.js"></script> <script type="module" src="./popup.js"></script> <script src="../../assets/javascripts/localise.js"></script> </body> -</html> +</html> \ No newline at end of file diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js index 14f59dfc..53e8c103 100644 --- a/src/pages/popup/popup.js +++ b/src/pages/popup/popup.js @@ -59,6 +59,7 @@ async function wholeInit() { await mediumHelper.init(); }; +let copyRawElement = document.getElementById('copy_raw'); wholeInit().then(() => { disableTwitterElement.checked = !twitterHelper.getDisable(); disableYoutubeElement.checked = !youtubeHelper.getDisable(); @@ -79,6 +80,7 @@ wholeInit().then(() => { let changeInstanceElement = document.getElementById("change-instance") changeInstanceElement.addEventListener("click", switchInstance); + copyRawElement.addEventListener("click", copyRaw); }) disableTwitterElement.addEventListener("change", @@ -153,7 +155,6 @@ document.getElementById("more-options").addEventListener("click", () => browser.runtime.openOptionsPage() ); - function switchInstance() { browser.tabs.query({ active: true, currentWindow: true }, function (tabs) { let currTab = tabs[0]; @@ -197,6 +198,34 @@ function switchInstance() { return false; } +function copyRaw() { + browser.tabs.query({ active: true, currentWindow: true }, function (tabs) { + let currTab = tabs[0]; + if (currTab) { + let url = currTab.url; + let tabUrl + try { tabUrl = new URL(url); } + catch (_) { return false; } + let newUrl; + newUrl = youtubeHelper.reverse(tabUrl); + if (!newUrl) newUrl = twitterHelper.reverse(tabUrl); + if (!newUrl) newUrl = instagramHelper.reverse(tabUrl); + if (!newUrl) newUrl = tiktokHelper.reverse(tabUrl); + if (!newUrl) newUrl = imgurHelper.reverse(tabUrl); + if (newUrl) { + navigator.clipboard.writeText(newUrl); + const oldHtml = copyRawElement.innerHTML; + copyRawElement.innerHTML = ` + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/> + </svg> + Copied`; + setTimeout(() => copyRawElement.innerHTML = oldHtml, 1000); + } + } + }) +} + let popupFrontends; generalHelper.init().then(() => { popupFrontends = generalHelper.getPopupFrontends(); diff --git a/src/pages/popup/style.css b/src/pages/popup/style.css index a2fc1256..4cc56145 100644 --- a/src/pages/popup/style.css +++ b/src/pages/popup/style.css @@ -3,6 +3,10 @@ body { min-height: auto; } +html, body { + margin: 0; +} + .hide { display: none !important; } \ No newline at end of file diff --git a/src/pages/stylesheets/styles.css b/src/pages/stylesheets/styles.css index 01a3d89d..5377edf3 100644 --- a/src/pages/stylesheets/styles.css +++ b/src/pages/stylesheets/styles.css @@ -193,7 +193,6 @@ hr { border: none; } - div.some-block { padding: 0 15px; justify-content: space-between; @@ -280,14 +279,11 @@ div.buttons { } div.buttons-popup { - border: 2px solid var(--bg-secondary); border-radius: 5px; display: flex; - margin: 0 15px; - margin-bottom: 15px; - margin-top: 5px; flex-wrap: wrap; - justify-content: center; + margin: 0 10px 7px 10px; + justify-content: start; align-items: center; } @@ -299,7 +295,7 @@ div.buttons-popup { color: var(--text); font-size: 16px; font-weight: bold; - margin: 5px 0px; + margin: 0; padding: 5px 5px; text-decoration: none; cursor: pointer; @@ -311,10 +307,15 @@ div.buttons-popup { } .button svg { - width: 26px; - height: 26px; + width: auto; + height: auto; padding: 0; + margin-right: 5px; +} + +body.rtl { margin-right: 0; + margin-left: 5px; } .button:hover svg { |