diff options
author | Hygna <hygna@proton.me> | 2022-10-04 19:00:06 +0100 |
---|---|---|
committer | Hygna <hygna@proton.me> | 2022-10-04 19:00:06 +0100 |
commit | aa408a4c9b3fd61d355328490e20048f77d0c647 (patch) | |
tree | 841ec358fbab402b625b860d83432b10e2a1d32a /src/pages | |
parent | updated instances (diff) | |
parent | Display if server is not found, made images in settings clickable (diff) | |
download | libredirect-aa408a4c9b3fd61d355328490e20048f77d0c647.zip |
Merge branch 'optimizations'
Diffstat (limited to 'src/pages')
61 files changed, 4338 insertions, 6319 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js index 7e37bade..7186144b 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD "use strict" import generalHelper from "../../assets/javascripts/general.js" @@ -243,3 +244,196 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => { }) browser.storage.local.set({ version: browser.runtime.getManifest().version }) +======= +"use strict" + +import generalHelper from "../../assets/javascripts/general.js" +import utils from "../../assets/javascripts/utils.js" +import servicesHelper from "../../assets/javascripts/services.js" + +window.browser = window.browser || window.chrome + +function initDefaults() { + browser.storage.local.clear(() => { + fetch("/instances/blacklist.json") + .then(response => response.text()) + .then(async data => { + browser.storage.local.set({ blacklists: JSON.parse(data) }, async () => { + await generalHelper.initDefaults() + await servicesHelper.initDefaults() + }) + }) + }) +} + +browser.runtime.onInstalled.addListener(details => { + // if (details.reason == 'install' || (details.reason == "update" && details.previousVersion != browser.runtime.getManifest().version)) { + // if (details.reason == "update") + // browser.storage.local.get(null, r => { + // if (r.theme) { + // const old = encodeURIComponent(JSON.stringify(r)) + // browser.tabs.create({ url: browser.runtime.getURL(`/pages/background/reset_warning.html?data=${old}`) }); + // } + // initDefaults(); + // }) + // else initDefaults(); + // } + switch (details.reason) { + case "install": + initDefaults() + break + case "update": + fetch("/instances/blacklist.json") + .then(response => response.text()) + .then(async data => { + browser.storage.local.set({ blacklists: JSON.parse(data) }, async () => { + switch (details.previousVersion) { + case "2.2.1": + await generalHelper.initDefaults() + await servicesHelper.initDefaults() + await servicesHelper.upgradeOptions() + break + } + }) + }) + } +}) + +let BYPASSTABs = [] +browser.webRequest.onBeforeRequest.addListener( + details => { + const url = new URL(details.url) + if (new RegExp(/^chrome-extension:\/{2}.*\/instances\/.*.json$/).test(url.href) && details.type == "xmlhttprequest") return + let initiator + try { + if (details.originUrl) initiator = new URL(details.originUrl) + else if (details.initiator) initiator = new URL(details.initiator) + } catch { + return null + } + + let newUrl = servicesHelper.redirect(url, details.type, initiator) + + if (details.frameAncestors && details.frameAncestors.length > 0 && generalHelper.isException(new URL(details.frameAncestors[0].url))) newUrl = null + + if (generalHelper.isException(url)) newUrl = "BYPASSTAB" + if (BYPASSTABs.includes(details.tabId)) newUrl = null + + if (newUrl) { + if (newUrl === "CANCEL") { + console.log(`Canceled ${url}`) + return { cancel: true } + } + if (newUrl === "BYPASSTAB") { + console.log(`Bypassed ${details.tabId} ${url}`) + if (!BYPASSTABs.includes(details.tabId)) BYPASSTABs.push(details.tabId) + return null + } + console.info("Redirecting", url.href, "=>", newUrl) + return { redirectUrl: newUrl } + } + return null + }, + { urls: ["<all_urls>"] }, + ["blocking"] +) + +browser.tabs.onRemoved.addListener(tabId => { + const i = BYPASSTABs.indexOf(tabId) + if (i > -1) { + BYPASSTABs.splice(i, 1) + console.log("Removed BYPASSTABs", tabId) + } +}) + +/* +browser.webRequest.onHeadersReceived.addListener( + e => { + let response = youtubeHelper.removeXFrameOptions(e) + if (!response) response = twitterHelper.removeXFrameOptions(e) + return response + }, + { urls: ["<all_urls>"] }, + ["blocking", "responseHeaders"] +) +*/ + +async function redirectOfflineInstance(url, tabId) { + let newUrl = await servicesHelper.switchInstance(url, true) + + if (newUrl) { + if (counter >= 5) { + browser.tabs.update(tabId, { + url: `/pages/errors/instance_offline.html?url=${encodeURIComponent(newUrl)}`, + }) + counter = 0 + } else { + browser.tabs.update(tabId, { url: newUrl }) + counter++ + } + } +} +let counter = 0 + +function isAutoRedirect() { + return new Promise(resolve => browser.storage.local.get("options", r => resolve(r.options.autoRedirect == true))) +} + +browser.webRequest.onResponseStarted.addListener( + async details => { + if (!(await isAutoRedirect())) return null + if (details.type == "main_frame" && details.statusCode >= 500) redirectOfflineInstance(new URL(details.url), details.tabId) + }, + { urls: ["<all_urls>"] } +) + +browser.webRequest.onErrorOccurred.addListener( + async details => { + if (!(await isAutoRedirect())) return + if (details.type == "main_frame") redirectOfflineInstance(new URL(details.url), details.tabId) + }, + { urls: ["<all_urls>"] } +) + +browser.commands.onCommand.addListener(command => { + if (command === "switchInstance") utils.switchInstance() + else if (command == "copyRaw") utils.copyRaw() + else if (command == "unify") utils.unify() +}) + +browser.contextMenus.create({ + id: "settings", + title: browser.i18n.getMessage("Settings"), + contexts: ["browser_action"], +}) + +browser.contextMenus.create({ + id: "switchInstance", + title: browser.i18n.getMessage("switchInstance"), + contexts: ["browser_action"], +}) + +browser.contextMenus.create({ + id: "copyRaw", + title: browser.i18n.getMessage("copyRaw"), + contexts: ["browser_action"], +}) + +browser.contextMenus.create({ + id: "unify", + title: browser.i18n.getMessage("unifySettings"), + contexts: ["browser_action"], +}) + +browser.contextMenus.onClicked.addListener(info => { + if (info.menuItemId == "switchInstance") utils.switchInstance() + else if (info.menuItemId == "settings") browser.runtime.openOptionsPage() + else if (info.menuItemId == "copyRaw") utils.copyRaw() + else if (info.menuItemId == "unify") utils.unify() +}) + +browser.runtime.onMessage.addListener((message, sender, sendResponse) => { + if (message.function === "unify") utils.unify(false).then(r => sendResponse({ response: r })) + return true +}) +>>>>>>> optimizations diff --git a/src/pages/options/index.ejs b/src/pages/options/index.ejs new file mode 100644 index 00000000..7f09e6da --- /dev/null +++ b/src/pages/options/index.ejs @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html id="elementToShowWithJavaScript" lang="en"> + <%- include('src/pages/widgets/head') -%> + <body class="option" dir="auto"> + <%- include('src/pages/widgets/links', {services: services}) -%> + <div id="pages"> + <%- include('src/pages/options/widgets/general', {config: {networks, services}}) -%> + <%- include('src/pages/options/widgets/services', {config: {networks, services}}) -%> + <%- include('src/pages/options/widgets/about') -%> + </div> + </body> + <script type="module" src="./index.js"></script> +</html> diff --git a/src/pages/options/index.html b/src/pages/options/index.html index af417403..53ee562e 100644 --- a/src/pages/options/index.html +++ b/src/pages/options/index.html @@ -1,3186 +1,3318 @@ <!DOCTYPE html> <html id="elementToShowWithJavaScript" lang="en"> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="icon" type="image/x-icon" href="../../../assets/images/libredirect.svg"> - <link href="../stylesheets/styles.css" rel="stylesheet"> - <title>General</title> - <script type="module" src="./init.js"></script> - </head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="icon" type="image/x-icon" href="../../../assets/images/libredirect.svg"> + <link href="../stylesheets/styles.css" rel="stylesheet"> + <title>General</title> + <script type="module" src="./init.js"></script> +</head> <body class="option" dir="auto"> - <section class="links" id="links"> - <div class="title"> - <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"></path> - </svg><a href="#general" data-localise="__MSG_general__">General</a> - </div> - <div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="#youtube" data-localise="__MSG_youtube__">YouTube </a></div> - <div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="#youtubeMusic" data-localise="__MSG_ytmusic__">YT Music</a></div> - <div class="title"> <img src="../../../assets/images/twitter-icon.png"><a href="#twitter" data-localise="__MSG_twitter__">Twitter</a></div> - <div class="title"> <img src="../../../assets/images/instagram-icon.png"><a href="#instagram" data-localise="__MSG_instagram__">Instagram</a></div> - <div class="title"> <img src="../../../assets/images/tiktok-icon.png"><a href="#tiktok" data-localise="__MSG_tiktok__">TikTok</a></div> - <div class="title"> <img src="../../../assets/images/reddit-icon.png"><a href="#reddit" data-localise="__MSG_reddit__">Reddit</a></div> - <div class="title"> <img src="../../../assets/images/imgur.png"><a href="#imgur" data-localise="__MSG_imgur__">Imgur</a></div> - <div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="#wikipedia" data-localise="__MSG_wikipedia__">Wikipedia</a></div> - <div class="title"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> - <circle cx="500" cy="500" r="500"></circle> - <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> - <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> - </svg><a href="#medium" data-localise="__MSG_medium__">Medium</a> - </div> - <div class="title"><img src="../../../assets/images/quora.png"><a href="#quora">Quora</a></div> - <div class="title"><img src="../../../assets/images/imdb.svg"><a href="#imdb">IMDb</a></div> - <div class="title"><img src="../../../assets/images/reuters.svg"><a href="#reuters">Reuters</a></div> - <div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="#peertube" data-localise="__MSG_peertube__">PeerTube</a></div> - <div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="#lbry" data-localise="__MSG_lbry__">LBRY</a></div> - <div class="title"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> - <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> - </svg><a href="#search" data-localise="__MSG_search__">Search</a> - </div> - <div class="title"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> - </svg><a href="#translate" data-localise="__MSG_translate__">Translate</a> - </div> - <div class="title"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> - </svg><a href="#maps" data-localise="__MSG_maps__">Maps</a> - </div> - <div class="title"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> - </svg><a href="#sendTargets" data-localise="__MSG_sendFiles__">Send Files</a> - </div> - <div class="title"> - <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="currentColor"> - <path d="M11 17h2v-6h-2Zm1-8q.425 0 .713-.288Q13 8.425 13 8t-.287-.713Q12.425 7 12 7t-.712.287Q11 7.575 11 8t.288.712Q11.575 9 12 9Zm0 13q-2.075 0-3.9-.788-1.825-.787-3.175-2.137-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175 1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138 1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175-1.35 1.35-3.175 2.137Q14.075 22 12 22Zm0-2q3.35 0 5.675-2.325Q20 15.35 20 12q0-3.35-2.325-5.675Q15.35 4 12 4 8.65 4 6.325 6.325 4 8.65 4 12q0 3a.35 2.325 5.675Q8.65 20 12 20Zm0-8Z"></path> - </svg><a href="#about" data-localise="__MSG_about">About</a> - </div> - </section> + <section class="links" id="links"> + <div class="title"> + <a href="#general"> + <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"></path> +</svg> + + <span data-localise="__MSG_general__">General</span> + </a></div> + <div class="title"> + <a href="#youtube"> + <img src="../../../assets/images/youtube-icon.png"> + <span data-localise="__MSG_youtube__">Youtube</span> + </a></div> + <div class="title"> + <a href="#youtubeMusic"> + <img src="../../../assets/images/youtubeMusic-icon.png"> + <span data-localise="__MSG_youtubeMusic__">YT Music</span> + </a></div> + <div class="title"> + <a href="#twitter"> + <img src="../../../assets/images/twitter-icon.png"> + <span data-localise="__MSG_twitter__">Twitter</span> + </a></div> + <div class="title"> + <a href="#instagram"> + <img src="../../../assets/images/instagram-icon.png"> + <span data-localise="__MSG_instagram__">Instagram</span> + </a></div> + <div class="title"> + <a href="#tiktok"> + <img src="../../../assets/images/tiktok-icon.png"> + <span data-localise="__MSG_tiktok__">TikTok</span> + </a></div> + <div class="title"> + <a href="#reddit"> + <img src="../../../assets/images/reddit-icon.png"> + <span data-localise="__MSG_reddit__">Reddit</span> + </a></div> + <div class="title"> + <a href="#imgur"> + <img src="../../../assets/images/imgur-icon.png"> + <span data-localise="__MSG_imgur__">Imgur</span> + </a></div> + <div class="title"> + <a href="#wikipedia"> + <img src="../../../assets/images/wikipedia-icon.svg"> + <span data-localise="__MSG_wikipedia__">Wikipedia</span> + </a></div> + <div class="title"> + <a href="#medium"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> + <circle cx="500" cy="500" r="500"></circle> + <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> + <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> +</svg> + + <span data-localise="__MSG_medium__">Medium</span> + </a></div> + <div class="title"> + <a href="#quora"> + <img src="../../../assets/images/quora-icon.png"> + <span data-localise="__MSG_quora__">Quora</span> + </a></div> + <div class="title"> + <a href="#imdb"> + <img src="../../../assets/images/imdb-icon.svg"> + <span data-localise="__MSG_imdb__">IMDb</span> + </a></div> + <div class="title"> + <a href="#reuters"> + <img src="../../../assets/images/reuters-icon.svg"> + <span data-localise="__MSG_reuters__">Reuters</span> + </a></div> + <div class="title"> + <a href="#peertube"> + <img src="../../../assets/images/peertube-icon.svg"> + <span data-localise="__MSG_peertube__">PeerTube</span> + </a></div> + <div class="title"> + <a href="#lbry"> + <img src="../../../assets/images/lbry-icon.png"> + <span data-localise="__MSG_lbry__">LBRY</span> + </a></div> + <div class="title"> + <a href="#search"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> + <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> +</svg> + + <span data-localise="__MSG_search__">Search</span> + </a></div> + <div class="title"> + <a href="#translate"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> +</svg> + + <span data-localise="__MSG_translate__">Translate</span> + </a></div> + <div class="title"> + <a href="#maps"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> +</svg> + + <span data-localise="__MSG_maps__">Maps</span> + </a></div> + <div class="title"> + <a href="#sendFiles"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> +</svg> + + <span data-localise="__MSG_sendFiles__">Send Files</span> + </a></div> + <div class="title"> + <a href="#about"> + <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="currentColor"> + <path d="M11 17h2v-6h-2Zm1-8q.425 0 .713-.288Q13 8.425 13 8t-.287-.713Q12.425 7 12 7t-.712.287Q11 7.575 11 8t.288.712Q11.575 9 12 9Zm0 13q-2.075 0-3.9-.788-1.825-.787-3.175-2.137-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175 1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138 1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175-1.35 1.35-3.175 2.137Q14.075 22 12 22Zm0-2q3.35 0 5.675-2.325Q20 15.35 20 12q0-3.35-2.325-5.675Q15.35 4 12 4 8.65 4 6.325 6.325 4 8.65 4 12q0 3a.35 2.325 5.675Q8.65 20 12 20Zm0-8Z"></path> +</svg> + + <span data-localise="__MSG_about__">About</span> + </a></div> +</section> <div id="pages"> <section class="option-block" id="general_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_general__">General</h1> - </div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_theme__">Theme</h4> - <select id="theme"> - <option value="DEFAULT" data-localise="__MSG_system__">System</option> - <option value="light" data-localise="__MSG_light__">Light</option> - <option value="dark" data-localise="__MSG_dark__">Dark</option> - </select> - </div> - <div class="some-block option-block"> - <h4 data-localise="__MSG_protocol__"></h4> - <select id="protocol"> - <option value="normal" data-localise="__MSG_normal__">Normal</option> - <option value="tor">Tor</option> - <option value="i2p">I2P</option> - <option value="loki">Lokinet</option> - </select> - </div> - <div id="protocol-fallback"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_protocolFallback__">Fallback to normal if no instances are available for the current protocol</h4> - <input id="protocol-fallback-checkbox" type="checkbox"> - </div> - </div> - <div class="some-block option-block"> - <h4 data-localise="__MSG_autoRedirect__"></h4> - <input id="auto-redirect" type="checkbox"> - </div> - <form> - <div class="some-block option-block"> - <h4 data-localise="__MSG_latencyThreshold">Latency Threshold</h4> - <output id="latency-output" for="latencyInput" name="latencyOutput"></output> - <input id="latency-input" type="range" min="50" max="5000" value="1000" name="latencyInput" step="50"> - </div> - </form> - <div class="some-block option-block"> - <h4 data-localise="__MSG_exceptions__"></h4> - </div> - <form id="custom-exceptions-instance-form"> - <div class="some-block option-block"> - <div class="some-block" style="padding:0;"> - <input id="exceptions-custom-instance" placeholder="https://www.google.com" type="url"> - <select id="exceptions-custom-instance-type"> - <option value="url">URL</option> - <option value="regex">Regex</option> - </select> - </div> - <button class="add" id="exceptions-add-instance" type="submit"> - <svg xmlns="http://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" id="exceptions-custom-checklist"></div> - <div class="buttons buttons-inline"><a class="button button-inline" id="update-instances"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path> - </svg> - <x data-localise="__MSG_updateInstances__">Update Instances</x></a> </div> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="import_settings_text" for="import-settings"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_importSettings__">Import Settings</x> - </label> - <input class="button button-inline" id="import-settings" type="file" style="display:none;"> <a class="button button-inline" id="export-settings"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path> - </svg> - <x data-localise="__MSG_exportSettings__">Export Settings</x></a> <a class="button button-inline" id="reset-settings"> - <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"> - <path d="M12,5V2L8,6l4,4V7c3.31,0,6,2.69,6,6c0,2.97-2.17,5.43-5,5.91v2.02c3.95-0.49,7-3.85,7-7.93C20,8.58,16.42,5,12,5z"></path> - <path d="M6,13c0-1.65,0.67-3.15,1.76-4.24L6.34,7.34C4.9,8.79,4,10.79,4,13c0,4.08,3.05,7.44,7,7.93v-2.02 C8.17,18.43,6,15.97,6,13z"></path> - </svg> - <x data-localise="__MSG_resetSettings__">Reset Settings</x></a> - </div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customPopup__">Customize Popup</h4> - </div> - <div class="checklist-popup" id="popup-frontends-checklist"> - <div> - <div><img src="../../../assets/images/youtube-icon.png"> - <x data-localise="__MSG_youtube__">YouTube</x> - </div> - <input id="youtube" type="checkbox"> - </div> - <div> - <div><img src="../../../assets/images/youtube-music-icon.png"> - <x data-localise="__MSG_ytmusic__">YoutubeMusic</x> - </div> - <input id="youtubeMusic" type="checkbox"> - </div> - <div> - <div><img src="../../../assets/images/twitter-icon.png"> - <x data-localise="__MSG_twitter__">Twitter</x> - </div> - <input id="twitter" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/instagram-icon.png"> - <x data-localise="__MSG_instagram__">Instagram</x> - </div> - <input id="instagram" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/tiktok-icon.png"> - <x data-localise="__MSG_tiktok__">TikTok</x> - </div> - <input id="tiktok" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/imgur.png"> - <x data-localise="__MSG_imgur__">Imgur</x> - </div> - <input id="imgur" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/reddit-icon.png"> - <x data-localise="__MSG_reddit__">Reddit</x> - </div> - <input id="reddit" type="checkbox"> - </div> - <div> - <div> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> - <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> - </svg> - <x data-localise="__MSG_search__">Search</x> - </div> - <input id="search" type="checkbox"> - </div> - <div> - <div> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> - <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> - </svg> - <x data-localise="__MSG_translate__">Translate</x> - </div> - <input id="translate" type="checkbox"> - </div> - <div> - <div> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> - <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> - </svg> - <x data-localise="__MSG_maps__">Maps</x> - </div> - <input id="maps" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/wikipedia-icon.svg"> - <x data-localise="__MSG_wikipedia__">Wikipedia</x> - </div> - <input id="wikipedia" type="checkbox"> - </div> - <div> - <div> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> - <circle cx="500" cy="500" r="500"></circle> - <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> - <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> - </svg> - <x data-localise="__MSG_medium__">Medium</x> - </div> - <input id="medium" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/quora.png"> - <x>Quora</x> - </div> - <input id="quora" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/imdb.svg"> - <x>IMDb</x> - </div> - <input id="imdb" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/reuters.svg"> - <x>Reuters</x> - </div> - <input id="reuters" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/peertube-icon.svg"> - <x data-localise="__MSG_peertube__">PeerTube</x> - </div> - <input id="peertube" type="checkbox"> - </div> - <div> - <div> <img src="../../../assets/images/lbry-icon.png"> - <x data-localise="__MSG_lbry__">LBRY</x> - </div> - <input id="lbry" type="checkbox"> - </div> - <div> - <div> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> - </svg> - <x data-localise="__MSG_sendFiles__">Send Files</x> - </div> - <input id="sendTargets" type="checkbox"> - </div> - </div> - <script type="module" src="./widgets/general.js"></script> - </section> + <div class="some-block option-block"> + <h1 data-localise="__MSG_general__">General</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_theme__">Theme</h4> + <select id="theme"> + <option value="detect" data-localise="__MSG_detect__">Detect</option> + <option value="light" data-localise="__MSG_light__">Light</option> + <option value="dark" data-localise="__MSG_dark__">Dark</option> + </select> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_network__">Network</h4> + <select id="network"> + <option value="clearnet">Clearnet</option> + <option value="tor">Tor</option> + <option value="i2p">I2P</option> + <option value="loki">Lokinet</option> + +</select> + </div> + <div id="network-fallback"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_networkFallback__">Fallback to clearnet if no instances are available for the current network</h4> + <input id="network-fallback-checkbox" type="checkbox"> + </div> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_autoRedirect__"></h4> + <input id="auto-redirect" type="checkbox"> + </div> + <form> + <div class="some-block option-block"> + <h4 data-localise="__MSG_latencyThreshold">Latency Threshold</h4> + <output id="latency-output" for="latencyInput" name="latencyOutput"></output> + <input id="latency-input" type="range" min="50" max="5000" value="1000" name="latencyInput" step="50"> + </div> + </form> + <div class="some-block option-block"> + <h4 data-localise="__MSG_exceptions__"></h4> + </div> + <form id="custom-exceptions-instance-form"> + <div class="some-block option-block"> + <div class="some-block" style="padding:0;"> + <input id="exceptions-custom-instance" placeholder="https://www.google.com" type="url"> + <select id="exceptions-custom-instance-type"> + <option value="url">URL</option> + <option value="regex">Regex</option> + </select> + </div> + <button class="add" id="exceptions-add-instance" type="submit"> + <svg xmlns="http://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" id="exceptions-custom-checklist"></div> + <div class="buttons buttons-inline"><a class="button button-inline" id="update-instances"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path> + </svg> + <x data-localise="__MSG_updateInstances__">Update Instances</x></a> </div> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="import_settings_text" for="import-settings"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_importSettings__">Import Settings</x> + </label> + <input class="button button-inline" id="import-settings" type="file" style="display:none;"> <a class="button button-inline" id="export-settings"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path> + </svg> + <x data-localise="__MSG_exportSettings__">Export Settings</x></a> <a class="button button-inline" id="reset-settings"> + <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"> + <path d="M12,5V2L8,6l4,4V7c3.31,0,6,2.69,6,6c0,2.97-2.17,5.43-5,5.91v2.02c3.95-0.49,7-3.85,7-7.93C20,8.58,16.42,5,12,5z"></path> + <path d="M6,13c0-1.65,0.67-3.15,1.76-4.24L6.34,7.34C4.9,8.79,4,10.79,4,13c0,4.08,3.05,7.44,7,7.93v-2.02 C8.17,18.43,6,15.97,6,13z"></path> + </svg> + <x data-localise="__MSG_resetSettings__">Reset Settings</x></a> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customPopup__">Customize Popup</h4> + </div> + <div class="checklist-popup" id="popup-frontends-checklist"> + <div> + <div> + <img src="../../../assets/images/youtube-icon.png"> + <label data-localise="__MSG_youtube__" for="youtube">Youtube</label> + </div> + <input id="youtube" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/youtubeMusic-icon.png"> + <label data-localise="__MSG_youtubeMusic__" for="youtubeMusic">YT Music</label> + </div> + <input id="youtubeMusic" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/twitter-icon.png"> + <label data-localise="__MSG_twitter__" for="twitter">Twitter</label> + </div> + <input id="twitter" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/instagram-icon.png"> + <label data-localise="__MSG_instagram__" for="instagram">Instagram</label> + </div> + <input id="instagram" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/tiktok-icon.png"> + <label data-localise="__MSG_tiktok__" for="tiktok">TikTok</label> + </div> + <input id="tiktok" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/reddit-icon.png"> + <label data-localise="__MSG_reddit__" for="reddit">Reddit</label> + </div> + <input id="reddit" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/imgur-icon.png"> + <label data-localise="__MSG_imgur__" for="imgur">Imgur</label> + </div> + <input id="imgur" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/wikipedia-icon.svg"> + <label data-localise="__MSG_wikipedia__" for="wikipedia">Wikipedia</label> + </div> + <input id="wikipedia" type="checkbox"> + </div> + <div> + <div> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> + <circle cx="500" cy="500" r="500"></circle> + <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> + <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> +</svg> + + <label data-localise="__MSG_medium__" for="medium">Medium</label> + </div> + <input id="medium" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/quora-icon.png"> + <label data-localise="__MSG_quora__" for="quora">Quora</label> + </div> + <input id="quora" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/imdb-icon.svg"> + <label data-localise="__MSG_imdb__" for="imdb">IMDb</label> + </div> + <input id="imdb" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/reuters-icon.svg"> + <label data-localise="__MSG_reuters__" for="reuters">Reuters</label> + </div> + <input id="reuters" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/peertube-icon.svg"> + <label data-localise="__MSG_peertube__" for="peertube">PeerTube</label> + </div> + <input id="peertube" type="checkbox"> + </div> + <div> + <div> + <img src="../../../assets/images/lbry-icon.png"> + <label data-localise="__MSG_lbry__" for="lbry">LBRY</label> + </div> + <input id="lbry" type="checkbox"> + </div> + <div> + <div> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> + <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> +</svg> + + <label data-localise="__MSG_search__" for="search">Search</label> + </div> + <input id="search" type="checkbox"> + </div> + <div> + <div> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> +</svg> + + <label data-localise="__MSG_translate__" for="translate">Translate</label> + </div> + <input id="translate" type="checkbox"> + </div> + <div> + <div> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> +</svg> + + <label data-localise="__MSG_maps__" for="maps">Maps</label> + </div> + <input id="maps" type="checkbox"> + </div> + <div> + <div> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> +</svg> + + <label data-localise="__MSG_sendFiles__" for="sendFiles">Send Files</label> + </div> + <input id="sendFiles" type="checkbox"> + </div> + +</div> + <script type="module" src="./widgets/general.js"></script> +</section> <section class="option-block" id="youtube_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_youtube__">YouTube</h1> - </div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="youtube-enable" type="checkbox"> - </div> - <div class="some-block option-block"> - <h4 data-localise="__MSG_frontend__">Frontend</h4> - <select id="youtube-frontend"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_youtube__">Youtube</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="youtube-enabled" type="checkbox"> + </div> + + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="youtube-frontend"> <option value="invidious">Invidious</option> <option value="piped">Piped</option> <option value="pipedMaterial">Piped-Material</option> <option value="cloudtube">CloudTube</option> <option value="freetube">FreeTube</option> - <option value="yatte">Yattee</option> - </select> - </div> - <div id="youtube-embedded_frontend"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_embeddedVids__">Embedded Videos Frontend</h4> - <select id="youtube-embed_frontend"> - <option value="invidious">Invidious</option> - <option value="piped">Piped</option> - <option value="pipedMaterial">Piped-Material</option> - <option value="cloudtube">CloudTube</option> - </select> - </div> - </div> - <div class="some-block option-block"> - <h4 data-localise="__MSG_redirectType__">Redirect Type</h4> - <select id="youtube-redirect_type"> - <option value="both" data-localise="__MSG_both__">both</option> - <option value="onlyNotEmbedded" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option> - </select> - </div> - <div id="invidious"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://invidious.com" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-invidious-label" for="latency-invidious"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-invidious" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://invidious.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://invidious.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://invidious.loki" type="url"> - <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> - </div> + <option value="yattee">Yattee</option> + + </select> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_embed_frontend__">Embed Frontend</h4> + <select id="youtube-embedFrontend"> + <option value="invidious">Invidious</option> + <option value="piped">Piped</option> + + </select> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_redirectType__">Redirect Type</h4> + <select id="youtube-redirectType"> + <option value="both" data-localise="__MSG_both__">both</option> + <option value="sub_frame" data-localise="__MSG_onlyEmbedded__">Only Embedded</option> + <option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option> + </select> + </div> + <hr> + <div id="invidious"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://invidious.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-invidious-label" for="latency-invidious"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-invidious" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://invidious.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://invidious.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://invidious.loki" type="url"> + <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> - <div id="piped"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-piped-label" for="latency-piped"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-piped" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://piped.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://piped.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://piped.loki" type="url"> - <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> + </form> + <div class="checklist custom-checklist"></div> </div> + + </div> + <div id="piped"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://piped.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-piped-label" for="latency-piped"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-piped" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://piped.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://piped.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://piped.loki" type="url"> + <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> - <div id="pipedMaterial"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-pipedMaterial-label" for="latency-pipedMaterial"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-pipedMaterial" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://piped-material.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://piped-material.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://piped-material.loki" type="url"> - <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> + </form> + <div class="checklist custom-checklist"></div> </div> + + </div> + <div id="pipedMaterial"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://pipedMaterial.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-pipedMaterial-label" for="latency-pipedMaterial"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-pipedMaterial" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://pipedMaterial.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://pipedMaterial.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://pipedMaterial.loki" type="url"> + <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> + </div> + + </div> <div id="cloudtube"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="https://cloudtube.com" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-cloudtube-label" for="latency-cloudtube"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-cloudtube" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://cloudtube.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://cloudtube.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://cloudtube.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/youtube.js"></script> - </section> - <section class="option-block" id="youtubeMusic_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_ytmusic__">YouTube Music</h1> - </div> - <hr> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="youtubeMusic-enable" type="checkbox"> - </div> + <input class="custom-instance" placeholder="http://cloudtube.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-cloudtube-label" for="latency-cloudtube"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-cloudtube" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://cloudtube.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_frontend__">Frontend</h4> - <select id="youtubeMusic-frontend"> + <input class="custom-instance" placeholder="http://cloudtube.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://cloudtube.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="youtubeMusic_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_youtubeMusic__">YT Music</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="youtubeMusic-enabled" type="checkbox"> + </div> + + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="youtubeMusic-frontend"> <option value="beatbump">Beatbump</option> - <option value="hyperpipe">Hyperpipe</option> - </select> - </div> - <div id="beatbump"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="https://beatbump.org" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-beatbump-label" for="latency-beatbump"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-beatbump" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://beatbump.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://beatbump.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://beatbump.loki" type="url"> - <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> - </div> - </div> - <div id="hyperpipe"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="https://hyperpipe.org" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-hyperpipe-label" for="latency-hyperpipe"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-hyperpipe" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://hyperpipe.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://hyperpipe.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://hyperpipe.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/youtubeMusic.js"></script> - </section> - <section class="option-block" id="twitter_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_twitter__">Twitter</h1> - </div> + <option value="hyperpipe">HyperPipe</option> + + </select> + </div> <hr> + <div id="beatbump"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="twitter-enable" type="checkbox"> - </div> - <div class="some-block option-block"> - <h4 data-localise="__MSG_redirectType__">Redirect Type</h4> - <select id="twitter-redirect_type"> - <option value="both" data-localise="__MSG_both__">both</option> - <option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option> - </select> - </div> - <div id="nitter"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-nitter-label" for="latency-nitter"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-nitter" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://nitter.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://nitter.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://nitter.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/twitter.js"></script> - </section> - <section class="option-block" id="instagram_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_instagram__">Instagram</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://beatbump.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-beatbump-label" for="latency-beatbump"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-beatbump" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="instagram-enable" type="checkbox"> - </div> - <div id="bibliogram"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-bibliogram-label" for="latency-bibliogram"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-bibliogram" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://bibliogram.onion" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://bibliogram.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/instagram.js"></script> - </section> - <section class="option-block" id="tiktok_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_tiktok__">TikTok</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://beatbump.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="tiktok-enable" type="checkbox"> - </div> - <div id="proxiTok"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-proxiTok-label" for="latency-proxiTok"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-proxiTok" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://proxitok.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://proxitok.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://proxitok.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/tiktok.js"></script> - </section> - <section class="option-block" id="reddit_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_reddit__">Reddit</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://beatbump.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="reddit-enable" type="checkbox"> + <input class="custom-instance" placeholder="http://beatbump.loki" type="url"> + <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> + </div> + + </div> + <div id="hyperpipe"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://hyperpipe.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-hyperpipe-label" for="latency-hyperpipe"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-hyperpipe" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://hyperpipe.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://hyperpipe.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://hyperpipe.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="twitter_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_twitter__">Twitter</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="twitter-enabled" type="checkbox"> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_redirectType__">Redirect Type</h4> + <select id="twitter-redirectType"> + <option value="both" data-localise="__MSG_both__">both</option> + <option value="sub_frame" data-localise="__MSG_onlyEmbedded__">Only Embedded</option> + <option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option> + </select> + </div> + <hr> + <div id="nitter"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://nitter.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-nitter-label" for="latency-nitter"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-nitter" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://nitter.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://nitter.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://nitter.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="instagram_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_instagram__">Instagram</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="instagram-enabled" type="checkbox"> + </div> + <hr> + <div id="bibliogram"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://bibliogram.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-bibliogram-label" for="latency-bibliogram"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-bibliogram" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://bibliogram.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://bibliogram.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 id="frontend" data-localise="__MSG_frontend__">Frontend</h4> - <select id="reddit-frontend"> + <input class="custom-instance" placeholder="http://bibliogram.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="tiktok_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_tiktok__">TikTok</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="tiktok-enabled" type="checkbox"> + </div> + <hr> + <div id="proxiTok"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://proxiTok.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-proxiTok-label" for="latency-proxiTok"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-proxiTok" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://proxiTok.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://proxiTok.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://proxiTok.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="reddit_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_reddit__">Reddit</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="reddit-enabled" type="checkbox"> + </div> + + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="reddit-frontend"> <option value="libreddit">Libreddit</option> <option value="teddit">Teddit</option> - </select> - </div> - <div id="libreddit"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-libreddit-label" for="latency-libreddit"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-libreddit" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://libreddit.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://libreddit.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://libreddit.loki" type="url"> - <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> - </div> - </div> - <div id="teddit"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-teddit-label" for="latency-teddit"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-teddit" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://teddit.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://teddit.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://teddit.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/reddit.js"></script> - </section> - <section class="option-block" id="imgur_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_imgur__">Imgur</h1> - </div> + + </select> + </div> <hr> + <div id="libreddit"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="imgur-enable" type="checkbox"> - </div> - <div id="rimgo"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-rimgo-label" for="latency-rimgo"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-rimgo" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://rimgo.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://rimgo.onion" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://rimgo.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/imgur.js"></script> - </section> - <section class="option-block" id="wikipedia_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_wikipedia__">Wikipedia</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://libreddit.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-libreddit-label" for="latency-libreddit"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-libreddit" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="wikipedia-enable" type="checkbox"> - </div> - <div id="wikiless"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-wikiless-label" for="latency-wikiless"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-wikiless" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://wikiless.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://wikiless.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/wikipedia.js"></script> - </section> - <section class="option-block" id="medium_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_medium__">Medium</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://libreddit.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="medium-enable" type="checkbox"> - </div> - <div id="scribe"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-scribe-label" for="latency-scribe"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-scribe" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://scribe.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://scribe.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://scribe.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/medium.js"></script> - </section> - <section class="option-block" id="quora_page"> - <div class="some-block option-block"> - <h1>Quora</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://libreddit.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="quora-enable" type="checkbox"> - </div> - <div id="quetre"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="https://quetre.com" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-quetre-label" for="latency-quetre"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-quetre" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://quetre.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://quetre.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://quetre.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/quora.js"></script> - </section> - <section class="option-block" id="imdb_page"> - <div class="some-block option-block"> - <h1>IMDb</h1> + <input class="custom-instance" placeholder="http://libreddit.loki" type="url"> + <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> - <hr> + </form> + <div class="checklist custom-checklist"></div> + </div> + + </div> + <div id="teddit"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="imdb-enable" type="checkbox"> - </div> - <div id="libremdb"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="https://libremdb.com" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-libremdb-label" for="latency-libremdb"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-libremdb" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://libremdb.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://libremdb.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://libremdb.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/imdb.js"></script> - </section> - <section class="option-block" id="reuters_page"> - <div class="some-block option-block"> - <h1>Reuters</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://teddit.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-teddit-label" for="latency-teddit"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-teddit" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="reuters-enable" type="checkbox"> - </div> - <div id="neuters"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="https://neuters.com" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-neuters-label" for="latency-neuters"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-neuters" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://neuters.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://neuters.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://neuters.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/reuters.js"></script> - </section> - <section class="option-block" id="peertube_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_peertube__">PeerTube</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://teddit.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="peertube-enable" type="checkbox"> - </div> - <div id="simpleertube"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-simpleertube-label" for="latency-simpleertube"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-simpleertube" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://simpleertube.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://simpleertube.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://simpleertube.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/peertube.js"></script> - </section> - <section class="option-block" id="lbry_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_lbry__">LBRY</h1> - </div> - <hr> + <input class="custom-instance" placeholder="http://teddit.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="lbry-enable" type="checkbox"> - </div> + <input class="custom-instance" placeholder="http://teddit.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="imgur_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_imgur__">Imgur</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="imgur-enabled" type="checkbox"> + </div> + <hr> + <div id="rimgo"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_frontend__">Frontend</h4> - <select id="lbry-frontend"> + <input class="custom-instance" placeholder="http://rimgo.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-rimgo-label" for="latency-rimgo"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-rimgo" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://rimgo.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://rimgo.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://rimgo.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="wikipedia_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_wikipedia__">Wikipedia</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="wikipedia-enabled" type="checkbox"> + </div> + <hr> + <div id="wikiless"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://wikiless.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-wikiless-label" for="latency-wikiless"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-wikiless" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://wikiless.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://wikiless.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://wikiless.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="medium_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_medium__">Medium</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="medium-enabled" type="checkbox"> + </div> + <hr> + <div id="scribe"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://scribe.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-scribe-label" for="latency-scribe"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-scribe" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://scribe.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://scribe.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://scribe.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="quora_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_quora__">Quora</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="quora-enabled" type="checkbox"> + </div> + <hr> + <div id="quetre"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://quetre.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-quetre-label" for="latency-quetre"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-quetre" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://quetre.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://quetre.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://quetre.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="imdb_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_imdb__">IMDb</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="imdb-enabled" type="checkbox"> + </div> + <hr> + <div id="libremdb"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://libremdb.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-libremdb-label" for="latency-libremdb"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-libremdb" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://libremdb.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://libremdb.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://libremdb.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="reuters_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_reuters__">Reuters</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="reuters-enabled" type="checkbox"> + </div> + <hr> + <div id="neuters"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://neuters.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-neuters-label" for="latency-neuters"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-neuters" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://neuters.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://neuters.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://neuters.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="peertube_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_peertube__">PeerTube</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="peertube-enabled" type="checkbox"> + </div> + <hr> + <div id="simpleertube"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simpleertube.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-simpleertube-label" for="latency-simpleertube"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-simpleertube" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simpleertube.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simpleertube.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simpleertube.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="lbry_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_lbry__">LBRY</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="lbry-enabled" type="checkbox"> + </div> + + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="lbry-frontend"> <option value="librarian">Librarian</option> - <option value="lbryDesktop" data-localise="__MSG_lbryDesktop__">LBRY Desktop</option> - </select> - </div> - <div class="some-block option-block"> - <h4 data-localise="__MSG_redirectType__">Redirect Type</h4> - <select id="lbry-redirect_type"> - <option value="both" data-localise="__MSG_both__">both</option> - <option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option> - </select> - </div> - <div id="librarian"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-librarian-label" for="latency-librarian"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-librarian" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://librarian.onion" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://librarian.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/lbry.js"></script> - </section> - <section class="option-block" id="search_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_search__">Search</h1> - </div> - <hr> + <option value="lbryDesktop">LBRY Desktop</option> + + </select> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_embed_frontend__">Embed Frontend</h4> + <select id="lbry-embedFrontend"> + <option value="librarian">Librarian</option> + + </select> + </div> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="search-enable" type="checkbox"> - </div> + <h4 data-localise="__MSG_redirectType__">Redirect Type</h4> + <select id="lbry-redirectType"> + <option value="both" data-localise="__MSG_both__">both</option> + <option value="sub_frame" data-localise="__MSG_onlyEmbedded__">Only Embedded</option> + <option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option> + </select> + </div> + <hr> + <div id="librarian"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_frontend__">Frontend</h4> - <select id="search-frontend"> - <option value="searxng">SearXNG</option> + <input class="custom-instance" placeholder="http://librarian.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-librarian-label" for="latency-librarian"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-librarian" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://librarian.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://librarian.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://librarian.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="search_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_search__">Search</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="search-enabled" type="checkbox"> + </div> + + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="search-frontend"> <option value="searx">SearX</option> + <option value="searxng">SearXNG</option> <option value="whoogle">Whoogle</option> <option value="librex">LibreX</option> - </select> - </div> - <div class="some-block"> - <h4 data-localise="__MSG_searchNote__">Note: To use Search, make LibRedirect the Default Search Engine</h4> - </div> - <div id="searx"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-searx-label" for="latency-searx"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-searx" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://searx.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://searx.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://searx.loki" type="url"> - <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> - </div> + + </select> + </div> + <hr> + <div id="searx"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searx.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-searx-label" for="latency-searx"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-searx" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searx.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searx.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searx.loki" type="url"> + <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> - <div id="searxng"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-searxng-label" for="latency-searxng"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-searxng" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://searxng.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://searxng.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://searxng.loki" type="url"> - <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> + </form> + <div class="checklist custom-checklist"></div> </div> + + </div> + <div id="searxng"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searxng.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-searxng-label" for="latency-searxng"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-searxng" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searxng.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searxng.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://searxng.loki" type="url"> + <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> - <div id="whoogle"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-whoogle-label" for="latency-whoogle"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-whoogle" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://whoogle.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://whoogle.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://whoogle.loki" type="url"> - <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> + </form> + <div class="checklist custom-checklist"></div> </div> + + </div> + <div id="whoogle"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://whoogle.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-whoogle-label" for="latency-whoogle"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-whoogle" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://whoogle.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://whoogle.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://whoogle.loki" type="url"> + <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> + </div> + + </div> <div id="librex"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="https://librex.com" type="url"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-librex-label" for="latency-librex"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-librex" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://librex.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://librex.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://librex.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/search.js"></script> - </section> - <section class="option-block" id="translate_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_translate__">Translate</h1> - </div> - <hr> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="translate-enable" type="checkbox"> - </div> + <input class="custom-instance" placeholder="http://librex.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-librex-label" for="latency-librex"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-librex" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://librex.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://librex.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_frontend__">Frontend</h4> - <select id="translate-frontend"> + <input class="custom-instance" placeholder="http://librex.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="translate_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_translate__">Translate</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="translate-enabled" type="checkbox"> + </div> + + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="translate-frontend"> <option value="simplyTranslate">SimplyTranslate</option> - <option value="lingva">Lingva</option> - </select> - </div> + <option value="lingva">Lingva Translate</option> + + </select> + </div> <hr> - <div id="simplyTranslate"> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-simplyTranslate-label" for="latency-simplyTranslate"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-simplyTranslate" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://simplytranslate.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://simplytranslate.loki" type="url"> - <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> - </div> + <div id="simplyTranslate"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simplyTranslate.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-simplyTranslate-label" for="latency-simplyTranslate"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-simplyTranslate" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simplyTranslate.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simplyTranslate.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://simplyTranslate.loki" type="url"> + <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> + </div> + + </div> <div id="lingva"> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-lingva-label" for="latency-lingva"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-lingva" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://lingvatranslate.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://lingvatranslate.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://lingvatranslate.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/translate.js"></script> - </section> - <section class="option-block" id="maps_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_maps__">Maps</h1> - </div> - <hr> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="maps-enable" type="checkbox"> - </div> + <input class="custom-instance" placeholder="http://lingva.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-lingva-label" for="latency-lingva"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-lingva" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_frontend__">Frontend</h4> - <select id="maps-frontend"> + <input class="custom-instance" placeholder="http://lingva.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://lingva.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://lingva.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="maps_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_maps__">Maps</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="maps-enabled" type="checkbox"> + </div> + + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="maps-frontend"> + <option value="facil">FacilMap</option> <option value="osm">OpenStreetMap</option> - <option value="facil">Facil Map</option> - </select> - </div> - <div id="facil"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-facil-label" for="latency-facil"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-facil" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://facilmap.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://facilmap.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://facilmap.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/maps.js"></script> - </section> - <section class="option-block" id="sendTargets_page"> - <div class="some-block option-block"> - <h1 data-localise="__MSG_sendFiles__">Send Files</h1> - </div> + + </select> + </div> <hr> + <div id="facil"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h4 data-localise="__MSG_enable__">Enable</h4> - <input id="sendTargets-enable" type="checkbox"> - </div> - <div id="send"> - <hr> - <div class="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <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"> - <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> - <div class="buttons buttons-inline"> - <label class="button button-inline" id="latency-send-label" for="latency-send"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> - </svg> - <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> - </label> - <input class="button button-inline" id="latency-send" style="display:none;"> - </div> - </div> - <div class="tor"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://send.onion" type="url"> - <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> - </div> - <div class="i2p"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://send.i2p" type="url"> - <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> - </div> - <div class="loki"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form class="custom-instance-form"> - <div class="some-block option-block"> - <input class="custom-instance" placeholder="http://send.loki" type="url"> - <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> - </div> - </div> - <script type="module" src="./widgets/sendTargets.js"></script> - </section> - <section class="option-block" id="about_page"> + <input class="custom-instance" placeholder="http://facil.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-facil-label" for="latency-facil"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-facil" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> <div class="some-block option-block"> - <h1 data-localise="__MSG_about__">About</h1> + <input class="custom-instance" placeholder="http://facil.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://facil.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://facil.loki" type="url"> + <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> + </div> + + </div> + +</section> +<section class="option-block" id="sendFiles_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_sendFiles__">Send Files</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="sendFiles-enabled" type="checkbox"> + </div> + <hr> + <div id="send"> + <div class="clearnet"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://send.org" type="url"> + <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> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-send-label" for="latency-send"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-send" style="display:none;"> + </div> + </div> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://send.onion" type="url"> + <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> + </div> + <div class="i2p"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://send.i2p" type="url"> + <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> + </div> + <div class="loki"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://send.loki" type="url"> + <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> - <hr> - <div class="about"> - <div class="some-block option-block"> - <h4>Donate: ♥️</h4> - <h4><a href='https://libredirect.github.io/donate'>https://libredirect.github.io/donate</a> </h4> - </div> - <div class="some-block option-block"> - <h4>FAQ:</h4> - <h4><a href='https://libredirect.github.io/faq'>https://libredirect.github.io/faq</a></h4> + </form> + <div class="checklist custom-checklist"></div> </div> - <div class="some-block option-block"> - <h4>Docs:</h4> - <h4><a href='https://libredirect.github.io/docs'>https://libredirect.github.io/docs</a></h4> - </div> - <div class="some-block option-block"> - <h4>Source Code:</h4> - <h4><a href='https://libredirect.github.io/source_code'>https://libredirect.github.io/source_code</a></h4> - </div> - </div> - </section> + + </div> + +</section> + +<script type="module" src="./widgets/services.js"></script> + <section class="option-block" id="about_page"> +<div class="some-block option-block"> + <h1 data-localise="__MSG_about__">About</h1> +</div> +<hr> +<div class="about"> + <div class="some-block option-block"> + <h4>Donate: ♥️</h4> + <h4><a href='https://libredirect.codeberg.page/donate'>https://libredirect.codeberg.page/donate</a> </h4> + </div> + <div class="some-block option-block"> + <h4>FAQ:</h4> + <h4><a href='https://libredirect.codeberg.page/faq'>https://libredirect.codeberg.page/faq</a></h4> + </div> + <div class="some-block option-block"> + <h4>Docs:</h4> + <h4><a href='https://libredirect.codeberg.page/docs'>https://libredirect.codeberg.page/docs</a></h4> + </div> + <div class="some-block option-block"> + <h4>Source Code:</h4> + <h4><a href='https://libredirect.codeberg.page/source_code'>https://libredirect.codeberg.page/source_code</a></h4> + </div> +</div> +</section> </div> </body> <script type="module" src="./index.js"></script> -</html> \ No newline at end of file +</html> diff --git a/src/pages/options/index.pug b/src/pages/options/index.pug deleted file mode 100644 index 3711fdac..00000000 --- a/src/pages/options/index.pug +++ /dev/null @@ -1,36 +0,0 @@ -doctype html -html#elementToShowWithJavaScript(lang="en") - head - meta(charset='utf-8') - meta(name="viewport" content="width=device-width, initial-scale=1") - link(rel="icon" type="image/x-icon" href="../../../assets/images/libredirect.svg") - link(href="../stylesheets/styles.css" rel="stylesheet") - title General - - script(type="module" src="./init.js") - body.option(dir="auto") - include ../widgets/links.pug - +links('general') - div#pages - include ./widgets/general.pug - include ./widgets/youtube.pug - include ./widgets/youtubeMusic.pug - include ./widgets/twitter.pug - include ./widgets/instagram.pug - include ./widgets/tiktok.pug - include ./widgets/reddit.pug - include ./widgets/imgur.pug - include ./widgets/wikipedia.pug - include ./widgets/medium.pug - include ./widgets/quora.pug - include ./widgets/imdb.pug - include ./widgets/reuters.pug - include ./widgets/peertube.pug - include ./widgets/lbry.pug - include ./widgets/search.pug - include ./widgets/translate.pug - include ./widgets/maps.pug - include ./widgets/sendTargets.pug - include ./widgets/about.pug - - script(type="module" src="./index.js") diff --git a/src/pages/options/init.js b/src/pages/options/init.js index 5b679da4..cac23748 100644 --- a/src/pages/options/init.js +++ b/src/pages/options/init.js @@ -4,8 +4,8 @@ import localise from "../../assets/javascripts/localise.js" function changeTheme() { return new Promise(resolve => { - browser.storage.local.get("theme", r => { - switch (r.theme) { + browser.storage.local.get("options", r => { + switch (r.options.theme) { case "dark": document.body.classList.add("dark-theme") document.body.classList.remove("light-theme") diff --git a/src/pages/options/widgets/about.ejs b/src/pages/options/widgets/about.ejs new file mode 100644 index 00000000..63c5b027 --- /dev/null +++ b/src/pages/options/widgets/about.ejs @@ -0,0 +1,24 @@ +<section class="option-block" id="about_page"> +<div class="some-block option-block"> + <h1 data-localise="__MSG_about__">About</h1> +</div> +<hr> +<div class="about"> + <div class="some-block option-block"> + <h4>Donate: ♥️</h4> + <h4><a href='https://libredirect.codeberg.page/donate'>https://libredirect.codeberg.page/donate</a> </h4> + </div> + <div class="some-block option-block"> + <h4>FAQ:</h4> + <h4><a href='https://libredirect.codeberg.page/faq'>https://libredirect.codeberg.page/faq</a></h4> + </div> + <div class="some-block option-block"> + <h4>Docs:</h4> + <h4><a href='https://libredirect.codeberg.page/docs'>https://libredirect.codeberg.page/docs</a></h4> + </div> + <div class="some-block option-block"> + <h4>Source Code:</h4> + <h4><a href='https://libredirect.codeberg.page/source_code'>https://libredirect.codeberg.page/source_code</a></h4> + </div> +</div> +</section> diff --git a/src/pages/options/widgets/about.pug b/src/pages/options/widgets/about.pug deleted file mode 100644 index 954522bb..00000000 --- a/src/pages/options/widgets/about.pug +++ /dev/null @@ -1,17 +0,0 @@ -section#about_page.option-block - .some-block.option-block - h1(data-localise="__MSG_about__") About - hr - .about - .some-block.option-block - h4 Donate: ♥️ - h4 <a href='https://libredirect.github.io/donate'>https://libredirect.github.io/donate</a> - .some-block.option-block - h4 FAQ: - h4 <a href='https://libredirect.github.io/faq'>https://libredirect.github.io/faq</a> - .some-block.option-block - h4 Docs: - h4 <a href='https://libredirect.github.io/docs'>https://libredirect.github.io/docs</a> - .some-block.option-block - h4 Source Code: - h4 <a href='https://libredirect.github.io/source_code'>https://libredirect.github.io/source_code</a> \ No newline at end of file diff --git a/src/pages/options/widgets/general.ejs b/src/pages/options/widgets/general.ejs new file mode 100644 index 00000000..e24046db --- /dev/null +++ b/src/pages/options/widgets/general.ejs @@ -0,0 +1,102 @@ +<section class="option-block" id="general_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_general__">General</h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_theme__">Theme</h4> + <select id="theme"> + <option value="detect" data-localise="__MSG_detect__">Detect</option> + <option value="light" data-localise="__MSG_light__">Light</option> + <option value="dark" data-localise="__MSG_dark__">Dark</option> + </select> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_network__">Network</h4> + <select id="network"> + <% for (const network in config.networks) { -%> +<option value="<%= network %>"><%= config.networks[network].name %></option> + <% }; %> +</select> + </div> + <div id="network-fallback"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_networkFallback__">Fallback to clearnet if no instances are available for the current network</h4> + <input id="network-fallback-checkbox" type="checkbox"> + </div> + </div> + <div class="some-block option-block"> + <h4 data-localise="__MSG_autoRedirect__"></h4> + <input id="auto-redirect" type="checkbox"> + </div> + <form> + <div class="some-block option-block"> + <h4 data-localise="__MSG_latencyThreshold">Latency Threshold</h4> + <output id="latency-output" for="latencyInput" name="latencyOutput"></output> + <input id="latency-input" type="range" min="50" max="5000" value="1000" name="latencyInput" step="50"> + </div> + </form> + <div class="some-block option-block"> + <h4 data-localise="__MSG_exceptions__"></h4> + </div> + <form id="custom-exceptions-instance-form"> + <div class="some-block option-block"> + <div class="some-block" style="padding:0;"> + <input id="exceptions-custom-instance" placeholder="https://www.google.com" type="url"> + <select id="exceptions-custom-instance-type"> + <option value="url">URL</option> + <option value="regex">Regex</option> + </select> + </div> + <button class="add" id="exceptions-add-instance" type="submit"> + <svg xmlns="http://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" id="exceptions-custom-checklist"></div> + <div class="buttons buttons-inline"><a class="button button-inline" id="update-instances"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path> + </svg> + <x data-localise="__MSG_updateInstances__">Update Instances</x></a> </div> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="import_settings_text" for="import-settings"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_importSettings__">Import Settings</x> + </label> + <input class="button button-inline" id="import-settings" type="file" style="display:none;"> <a class="button button-inline" id="export-settings"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path> + </svg> + <x data-localise="__MSG_exportSettings__">Export Settings</x></a> <a class="button button-inline" id="reset-settings"> + <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"> + <path d="M12,5V2L8,6l4,4V7c3.31,0,6,2.69,6,6c0,2.97-2.17,5.43-5,5.91v2.02c3.95-0.49,7-3.85,7-7.93C20,8.58,16.42,5,12,5z"></path> + <path d="M6,13c0-1.65,0.67-3.15,1.76-4.24L6.34,7.34C4.9,8.79,4,10.79,4,13c0,4.08,3.05,7.44,7,7.93v-2.02 C8.17,18.43,6,15.97,6,13z"></path> + </svg> + <x data-localise="__MSG_resetSettings__">Reset Settings</x></a> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customPopup__">Customize Popup</h4> + </div> + <div class="checklist-popup" id="popup-frontends-checklist"> + <% for (const service in config.services) { -%> +<div> + <div> + <% if (config.services[service].imageType != "svgMono") { _%> + <img src="../../../assets/images/<%= service %>-icon.<%= config.services[service].imageType %>"> + <% } else { _%> + <%- include ('src/assets/images/' + service + '-icon.svg') %> + <% } _%> + <label data-localise="__MSG_<%= service %>__" for="<%= service %>"><%= config.services[service].name %></label> + </div> + <input id="<%= service %>" type="checkbox"> + </div> + <% }; %> +</div> + <script type="module" src="./widgets/general.js"></script> +</section> diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js index 61b422f4..cba46de2 100644 --- a/src/pages/options/widgets/general.js +++ b/src/pages/options/widgets/general.js @@ -3,25 +3,7 @@ window.browser = window.browser || window.chrome import utils from "../../../assets/javascripts/utils.js" import generalHelper from "../../../assets/javascripts/general.js" - -import youtubeHelper from "../../../assets/javascripts/youtube/youtube.js" -import youtubeMusicHelper from "../../../assets/javascripts/youtubeMusic.js" -import twitterHelper from "../../../assets/javascripts/twitter.js" -import instagramHelper from "../../../assets/javascripts/instagram.js" -import redditHelper from "../../../assets/javascripts/reddit.js" -import searchHelper from "../../../assets/javascripts/search.js" -import translateHelper from "../../../assets/javascripts/translate/translate.js" -import mapsHelper from "../../../assets/javascripts/maps.js" -import wikipediaHelper from "../../../assets/javascripts/wikipedia.js" -import mediumHelper from "../../../assets/javascripts/medium.js" -import quoraHelper from "../../../assets/javascripts/quora.js" -import libremdbHelper from "../../../assets/javascripts/imdb.js" -import reutersHelper from "../../../assets/javascripts/reuters.js" -import imgurHelper from "../../../assets/javascripts/imgur.js" -import tiktokHelper from "../../../assets/javascripts/tiktok.js" -import sendTargetsHelper from "../../../assets/javascripts/sendTargets.js" -import peertubeHelper from "../../../assets/javascripts/peertube.js" -import lbryHelper from "../../../assets/javascripts/lbry.js" +import servicesHelper from "../../../assets/javascripts/services.js" let updateInstancesElement = document.getElementById("update-instances") updateInstancesElement.addEventListener("click", async () => { @@ -33,12 +15,46 @@ updateInstancesElement.addEventListener("click", async () => { } else updateInstancesElement.innerHTML = "Failed Miserabely" }) +let config + +async function getConfig() { + return new Promise(resolve => { + fetch("/config/config.json") + .then(response => response.text()) + .then(data => { + config = JSON.parse(data) + resolve() + }) + }) +} + +function setOption(option, type, event) { + browser.storage.local.get("options", r => { + let options = r.options + browser.storage.local.set({ options }) + }) + + browser.storage.local.get("options", r => { + let options = r.options + if (type == "select") { + options[option] = event.target.options[event.target.options.selectedIndex].value + } else if (type == "checkbox") { + options[option] = event.target.checked + } else if (type == "range") { + options[option] = event.target.value + } + + browser.storage.local.set({ options }) + }) +} + let exportSettingsElement = document.getElementById("export-settings") function exportSettings() { - return browser.storage.local.get(null, result => { - let resultString = JSON.stringify(result, null, " ") - exportSettingsElement.href = "data:application/json;base64," + btoa(encodeURI(resultString)) + browser.storage.local.get("options", result => { + result.options.version = browser.runtime.getManifest().version + let resultString = JSON.stringify(result.options, null, " ") + exportSettingsElement.href = "data:application/json;base64," + btoa(resultString) exportSettingsElement.download = "libredirect-settings.json" return }) @@ -57,7 +73,22 @@ importSettingsElement.addEventListener("change", () => { reader.onload = async () => { const data = JSON.parse(reader.result) if ("theme" in data && "disableImgur" in data && "imgurRedirects" in data) { - browser.storage.local.clear(() => browser.storage.local.set({ ...data }, () => location.reload())) + browser.storage.local.clear(() => + browser.storage.local.set({ ...data }, () => { + fetch("/instances/blacklist.json") + .then(response => response.text()) + .then(async data => { + browser.storage.local.set({ blacklists: JSON.parse(data) }, async () => { + await generalHelper.initDefaults() + await servicesHelper.initDefaults() + await servicesHelper.upgradeOptions() + location.reload() + }) + }) + }) + ) + } else if ("version" in data) { + browser.storage.local.clear(() => browser.storage.local.set({ options: data }, () => location.reload())) } else { console.log("incompatible settings") importError() @@ -81,31 +112,10 @@ resetSettings.addEventListener("click", async () => { fetch("/instances/blacklist.json") .then(response => response.text()) .then(async data => { - browser.storage.local.set({ cloudflareBlackList: JSON.parse(data).cloudflare }, () => { - browser.storage.local.set({ offlineBlackList: JSON.parse(data).offline }, () => { - browser.storage.local.set({ authenticateBlackList: JSON.parse(data).authenticate }, async () => { - await generalHelper.initDefaults() - await youtubeHelper.initDefaults() - await youtubeMusicHelper.initDefaults() - await twitterHelper.initDefaults() - await instagramHelper.initDefaults() - await mapsHelper.initDefaults() - await searchHelper.initDefaults() - await translateHelper.initDefaults() - await mediumHelper.initDefaults() - await quoraHelper.initDefaults() - await libremdbHelper.initDefaults() - await reutersHelper.initDefaults() - await redditHelper.initDefaults() - await wikipediaHelper.initDefaults() - await imgurHelper.initDefaults() - await tiktokHelper.initDefaults() - await sendTargetsHelper.initDefaults() - await peertubeHelper.initDefaults() - await lbryHelper.initDefaults() - location.reload() - }) - }) + browser.storage.local.set({ blacklists: JSON.parse(data) }, async () => { + await generalHelper.initDefaults() + await servicesHelper.initDefaults() + location.reload() }) }) }) @@ -113,32 +123,30 @@ resetSettings.addEventListener("click", async () => { let autoRedirectElement = document.getElementById("auto-redirect") autoRedirectElement.addEventListener("change", event => { - browser.storage.local.set({ autoRedirect: event.target.checked }) + setOption("autoRedirect", "checkbox", event) }) let themeElement = document.getElementById("theme") themeElement.addEventListener("change", event => { - const value = event.target.options[theme.selectedIndex].value - browser.storage.local.set({ theme: value }) + setOption("theme", "select", event) location.reload() }) -let protocolElement = document.getElementById("protocol") -protocolElement.addEventListener("change", event => { - const value = event.target.options[protocol.selectedIndex].value - browser.storage.local.set({ protocol: value }) +let networkElement = document.getElementById("network") +networkElement.addEventListener("change", event => { + setOption("network", "select", event) location.reload() }) -let protocolFallbackCheckbox = document.getElementById("protocol-fallback-checkbox") -protocolFallbackCheckbox.addEventListener("change", event => { - browser.storage.local.set({ protocolFallback: event.target.checked }) +let networkFallbackCheckbox = document.getElementById("network-fallback-checkbox") +networkFallbackCheckbox.addEventListener("change", event => { + setOption("networkFallback", "checkbox", event) }) let latencyOutput = document.getElementById("latency-output") let latencyInput = document.getElementById("latency-input") latencyInput.addEventListener("change", event => { - browser.storage.local.set({ latencyThreshold: event.target.value }) + setOption("latencyThreshold", "range", event) }) latencyInput.addEventListener("input", event => { latencyOutput.value = event.target.value @@ -148,60 +156,55 @@ let nameCustomInstanceInput = document.getElementById("exceptions-custom-instanc let instanceTypeElement = document.getElementById("exceptions-custom-instance-type") let instanceType = "url" -let popupFrontends -for (const frontend of generalHelper.allPopupFrontends) - document.getElementById(frontend).addEventListener("change", event => { - if (event.target.checked && !popupFrontends.includes(frontend)) popupFrontends.push(frontend) - else if (popupFrontends.includes(frontend)) { - var index = popupFrontends.indexOf(frontend) - if (index !== -1) popupFrontends.splice(index, 1) - } - browser.storage.local.set({ popupFrontends }) - }) +await getConfig() +for (const service in config.services) { + document.getElementById(service).addEventListener("change", event => { + browser.storage.local.get("options", r => { + let options = r.options + if (event.target.checked && !options.popupServices.includes(service)) options.popupServices.push(service) + else if (options.popupServices.includes(service)) { + var index = options.popupServices.indexOf(service) + if (index !== -1) options.popupServices.splice(index, 1) + } + browser.storage.local.set({ options }) + }) + }) +} // const firstPartyIsolate = document.getElementById('firstPartyIsolate'); // firstPartyIsolate.addEventListener("change", () => browser.storage.local.set({ firstPartyIsolate: firstPartyIsolate.checked })) -browser.storage.local.get( - [ - "theme", - "autoRedirect", - "exceptions", - "protocol", - "protocolFallback", - "latencyThreshold", - // 'firstPartyIsolate' - ], - r => { - autoRedirectElement.checked = r.autoRedirect - themeElement.value = r.theme - protocolElement.value = r.protocol - protocolFallbackCheckbox.checked = r.protocolFallback - latencyOutput.value = r.latencyThreshold - // firstPartyIsolate.checked = r.firstPartyIsolate; +browser.storage.local.get("options", r => { + autoRedirectElement.checked = r.options.autoRedirect + themeElement.value = r.options.theme + networkElement.value = r.options.network + networkFallbackCheckbox.checked = r.options.networkFallback + latencyOutput.value = r.options.latencyThreshold + let options = r.options + // firstPartyIsolate.checked = r.firstPartyIsolate; - let protocolFallbackElement = document.getElementById("protocol-fallback") - if (protocolElement.value == "normal") { - protocolFallbackElement.style.display = "none" - } else { - protocolFallbackElement.style.display = "block" - } + //let networkFallbackElement = document.getElementById("network-fallback") + if (networkElement.value == "clearnet") { + networkFallbackCheckbox.disabled = true + } else { + networkFallbackCheckbox.disabled = false + } - instanceTypeElement.addEventListener("change", event => { - instanceType = event.target.options[instanceTypeElement.selectedIndex].value - if (instanceType == "url") { - nameCustomInstanceInput.setAttribute("type", "url") - nameCustomInstanceInput.setAttribute("placeholder", "https://www.google.com") - } else if (instanceType == "regex") { - nameCustomInstanceInput.setAttribute("type", "text") - nameCustomInstanceInput.setAttribute("placeholder", "https?://(www.|)youtube.com/") - } - }) - let exceptionsCustomInstances = r.exceptions - function calcExceptionsCustomInstances() { - document.getElementById("exceptions-custom-checklist").innerHTML = [...exceptionsCustomInstances.url, ...exceptionsCustomInstances.regex] - .map( - x => `<div> + instanceTypeElement.addEventListener("change", event => { + instanceType = event.target.options[instanceTypeElement.selectedIndex].value + if (instanceType == "url") { + nameCustomInstanceInput.setAttribute("type", "url") + nameCustomInstanceInput.setAttribute("placeholder", "https://www.google.com") + } else if (instanceType == "regex") { + nameCustomInstanceInput.setAttribute("type", "text") + nameCustomInstanceInput.setAttribute("placeholder", "https?://(www.|)youtube.com/") + } + }) + let exceptionsCustomInstances = r.options.exceptions + function calcExceptionsCustomInstances() { + document.getElementById("exceptions-custom-checklist").innerHTML = [...exceptionsCustomInstances.url, ...exceptionsCustomInstances.regex] + .map( + x => `<div> ${x} <button class="add" id="clear-${x}"> <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" @@ -211,49 +214,47 @@ browser.storage.local.get( </button> </div> <hr>` - ) - .join("\n") + ) + .join("\n") - for (const x of [...exceptionsCustomInstances.url, ...exceptionsCustomInstances.regex]) { - document.getElementById(`clear-${x}`).addEventListener("click", () => { - console.log(x) - let index - index = exceptionsCustomInstances.url.indexOf(x) - if (index > -1) exceptionsCustomInstances.url.splice(index, 1) - else { - index = exceptionsCustomInstances.regex.indexOf(x) - if (index > -1) exceptionsCustomInstances.regex.splice(index, 1) - } - browser.storage.local.set({ exceptions: exceptionsCustomInstances }) - calcExceptionsCustomInstances() - }) - } + for (const x of [...exceptionsCustomInstances.url, ...exceptionsCustomInstances.regex]) { + document.getElementById(`clear-${x}`).addEventListener("click", () => { + console.log(x) + let index + index = exceptionsCustomInstances.url.indexOf(x) + if (index > -1) exceptionsCustomInstances.url.splice(index, 1) + else { + index = exceptionsCustomInstances.regex.indexOf(x) + if (index > -1) exceptionsCustomInstances.regex.splice(index, 1) + } + options.exceptions = exceptionsCustomInstances + browser.storage.local.set({ options }) + calcExceptionsCustomInstances() + }) } - calcExceptionsCustomInstances() - document.getElementById("custom-exceptions-instance-form").addEventListener("submit", event => { - event.preventDefault() + } + calcExceptionsCustomInstances() + document.getElementById("custom-exceptions-instance-form").addEventListener("submit", event => { + event.preventDefault() - let val - if (instanceType == "url") { - if (nameCustomInstanceInput.validity.valid) { - let url = new URL(nameCustomInstanceInput.value) - val = `${url.protocol}//${url.host}` - if (!exceptionsCustomInstances.url.includes(val)) exceptionsCustomInstances.url.push(val) - } - } else if (instanceType == "regex") { - val = nameCustomInstanceInput.value - if (val.trim() != "" && !exceptionsCustomInstances.regex.includes(val)) exceptionsCustomInstances.regex.push(val) - } - if (val) { - browser.storage.local.set({ exceptions: exceptionsCustomInstances }) - nameCustomInstanceInput.value = "" + let val + if (instanceType == "url") { + if (nameCustomInstanceInput.validity.valid) { + let url = new URL(nameCustomInstanceInput.value) + val = `${url.network}//${url.host}` + if (!exceptionsCustomInstances.url.includes(val)) exceptionsCustomInstances.url.push(val) } - calcExceptionsCustomInstances() - }) + } else if (instanceType == "regex") { + val = nameCustomInstanceInput.value + if (val.trim() != "" && !exceptionsCustomInstances.regex.includes(val)) exceptionsCustomInstances.regex.push(val) + } + if (val) { + options.exceptions = exceptionsCustomInstances + browser.storage.local.set({ options }) + nameCustomInstanceInput.value = "" + } + calcExceptionsCustomInstances() + }) - browser.storage.local.get("popupFrontends", r => { - popupFrontends = r.popupFrontends - for (const frontend of generalHelper.allPopupFrontends) document.getElementById(frontend).checked = popupFrontends.includes(frontend) - }) - } -) + for (const service in config.services) document.getElementById(service).checked = options.popupServices.includes(service) +}) diff --git a/src/pages/options/widgets/general.pug b/src/pages/options/widgets/general.pug deleted file mode 100644 index 891217ca..00000000 --- a/src/pages/options/widgets/general.pug +++ /dev/null @@ -1,210 +0,0 @@ -section#general_page.option-block - .some-block.option-block - h1(data-localise="__MSG_general__") General - hr - - .some-block.option-block - h4(data-localise="__MSG_theme__") Theme - select#theme - option(value="DEFAULT" data-localise="__MSG_system__") System - option(value="light" data-localise="__MSG_light__") Light - option(value="dark" data-localise="__MSG_dark__") Dark - - //- .some-block.option-block - h4 Tor Browser - input#firstPartyIsolate(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_protocol__") - select#protocol - option(value="normal" data-localise="__MSG_normal__") Normal - option(value="tor") Tor - option(value="i2p") I2P - option(value="loki") Lokinet - - #protocol-fallback - .some-block.option-block - h4(data-localise="__MSG_protocolFallback__") Fallback to normal if no instances are available for the current protocol - input#protocol-fallback-checkbox(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_autoRedirect__") - input#auto-redirect(type="checkbox") - - form - .some-block.option-block - h4(data-localise="__MSG_latencyThreshold") Latency Threshold - output#latency-output(for="latencyInput" name="latencyOutput") - input#latency-input(type="range" min="50" max="5000" value="1000" name="latencyInput" step="50") - - .some-block.option-block - h4(data-localise="__MSG_exceptions__") - - form#custom-exceptions-instance-form - .some-block.option-block - .some-block(style="padding:0;") - input#exceptions-custom-instance(placeholder="https://www.google.com" type="url") - | - select#exceptions-custom-instance-type - option(value="url") URL - option(value="regex") Regex - | - button#exceptions-add-instance.add(type="submit") - svg(xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor") - path(d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z") - - #exceptions-custom-checklist.checklist - - .buttons.buttons-inline - a#update-instances.button.button-inline - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z") - x(data-localise="__MSG_updateInstances__") Update Instances - - | - - .buttons.buttons-inline - - label#import_settings_text.button.button-inline(for="import-settings") - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z") - | - x(data-localise="__MSG_importSettings__") Import Settings - input#import-settings.button.button-inline(type="file" style="display:none;") - - | - - a#export-settings.button.button-inline - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z") - | - x(data-localise="__MSG_exportSettings__") Export Settings - - | - - a#reset-settings.button.button-inline - 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") - path(d="M12,5V2L8,6l4,4V7c3.31,0,6,2.69,6,6c0,2.97-2.17,5.43-5,5.91v2.02c3.95-0.49,7-3.85,7-7.93C20,8.58,16.42,5,12,5z") - path(d="M6,13c0-1.65,0.67-3.15,1.76-4.24L6.34,7.34C4.9,8.79,4,10.79,4,13c0,4.08,3.05,7.44,7,7.93v-2.02 C8.17,18.43,6,15.97,6,13z") - x(data-localise="__MSG_resetSettings__") Reset Settings - hr - - .some-block.option-block - h4(data-localise="__MSG_customPopup__") Customize Popup - - #popup-frontends-checklist.checklist-popup - div - div - img(src="../../../assets/images/youtube-icon.png") - x(data-localise="__MSG_youtube__") YouTube - input#youtube(type="checkbox") - div - div - img(src="../../../assets/images/youtube-music-icon.png") - x(data-localise="__MSG_ytmusic__") YoutubeMusic - input#youtubeMusic(type="checkbox") - div - div - img(src="../../../assets/images/twitter-icon.png") - x(data-localise="__MSG_twitter__") Twitter - input#twitter(type="checkbox") - - div - div - img(src="../../../assets/images/instagram-icon.png") - x(data-localise="__MSG_instagram__") Instagram - input#instagram(type="checkbox") - - div - div - img(src="../../../assets/images/tiktok-icon.png") - x(data-localise="__MSG_tiktok__") TikTok - input#tiktok(type="checkbox") - - div - div - img(src="../../../assets/images/imgur.png") - x(data-localise="__MSG_imgur__") Imgur - input#imgur(type="checkbox") - - div - div - img(src="../../../assets/images/reddit-icon.png") - x(data-localise="__MSG_reddit__") Reddit - input#reddit(type="checkbox") - - div - div - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor") - path(d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z") - x(data-localise="__MSG_search__") Search - input#search(type="checkbox") - - div - div - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor") - path(d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z") - x(data-localise="__MSG_translate__") Translate - input#translate(type="checkbox") - - div - div - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor") - path(d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z") - x(data-localise="__MSG_maps__") Maps - input#maps(type="checkbox") - - div - div - img(src="../../../assets/images/wikipedia-icon.svg") - x(data-localise="__MSG_wikipedia__") Wikipedia - input#wikipedia(type="checkbox") - - div - div - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor") - circle(cx="500" cy="500" r="500") - ellipse(ry="475" rx="250" cy="501" cx="1296") - ellipse(cx="1682" cy="502" rx="88" ry="424") - x(data-localise="__MSG_medium__") Medium - input#medium(type="checkbox") - - div - div - img(src="../../../assets/images/quora.png") - x() Quora - input#quora(type="checkbox") - - div - div - img(src="../../../assets/images/imdb.svg") - x IMDb - input#imdb(type="checkbox") - - div - div - img(src="../../../assets/images/reuters.svg") - x Reuters - input#reuters(type="checkbox") - - div - div - img(src="../../../assets/images/peertube-icon.svg") - x(data-localise="__MSG_peertube__") PeerTube - input#peertube(type="checkbox") - - div - div - img(src="../../../assets/images/lbry-icon.png") - x(data-localise="__MSG_lbry__") LBRY - input#lbry(type="checkbox") - - div - div - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z") - x(data-localise="__MSG_sendFiles__") Send Files - input#sendTargets(type="checkbox") - - - script(type="module" src="./widgets/general.js") diff --git a/src/pages/options/widgets/imdb.js b/src/pages/options/widgets/imdb.js deleted file mode 100644 index 094c5672..00000000 --- a/src/pages/options/widgets/imdb.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("libremdb") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("imdb-enable") -const imdb = document.getElementById("imdb_page") -//const frontend = document.getElementById("imdb-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableImdb", "protocol"], r => { - enable.checked = !r.disableImdb - protocol = r.protocol - changeProtocolSettings() -}) - -imdb.addEventListener("change", () => { - browser.storage.local.set({ disableImdb: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("imdb", frontends[i], protocols[x], document) - } - utils.latency("imdb", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/imdb.pug b/src/pages/options/widgets/imdb.pug deleted file mode 100644 index 257d2c1a..00000000 --- a/src/pages/options/widgets/imdb.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#imdb_page.option-block - .some-block.option-block - h1() IMDb - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#imdb-enable(type="checkbox") - - #libremdb - hr - .normal - include ../../widgets/instances.pug - +instances('https://libremdb.com') - include ../../widgets/latency.pug - +latency('libremdb') - .tor - include ../../widgets/instances.pug - +instances('http://libremdb.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://libremdb.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://libremdb.loki') - - script(type="module" src="./widgets/imdb.js") diff --git a/src/pages/options/widgets/imgur.js b/src/pages/options/widgets/imgur.js deleted file mode 100644 index 236e809d..00000000 --- a/src/pages/options/widgets/imgur.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("rimgo") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("imgur-enable") -const imgur = document.getElementById("imgur_page") -//const frontend = document.getElementById("imgur-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableImgur", "protocol"], r => { - enable.checked = !r.disableImgur - protocol = r.protocol - changeProtocolSettings() -}) - -imgur.addEventListener("change", () => { - browser.storage.local.set({ disableImgur: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("imgur", frontends[i], protocols[x], document) - } - utils.latency("imgur", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/imgur.pug b/src/pages/options/widgets/imgur.pug deleted file mode 100644 index eacd066e..00000000 --- a/src/pages/options/widgets/imgur.pug +++ /dev/null @@ -1,27 +0,0 @@ -section#imgur_page.option-block - .some-block.option-block - h1(data-localise="__MSG_imgur__") Imgur - hr - - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#imgur-enable(type="checkbox") - - #rimgo - hr - .normal - include ../../widgets/instances.pug - +instances('https://rimgo.com') - include ../../widgets/latency.pug - +latency('rimgo') - .tor - include ../../widgets/instances.pug - +instances('http://rimgo.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://rimgo.onion') - .loki - include ../../widgets/instances.pug - +instances('http://rimgo.loki') - - script(type="module" src="./widgets/imgur.js") diff --git a/src/pages/options/widgets/instagram.js b/src/pages/options/widgets/instagram.js deleted file mode 100644 index e22f720f..00000000 --- a/src/pages/options/widgets/instagram.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("bibliogram") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("instagram-enable") -const instagram = document.getElementById("instagram_page") -//const frontend = document.getElementById("instagram-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableInstagram", "protocol"], r => { - enable.checked = !r.disableInstagram - protocol = r.protocol - changeProtocolSettings() -}) - -instagram.addEventListener("change", () => { - browser.storage.local.set({ disableInstagram: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("instagram", frontends[i], protocols[x], document) - } - utils.latency("instagram", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/instagram.pug b/src/pages/options/widgets/instagram.pug deleted file mode 100644 index cc72f787..00000000 --- a/src/pages/options/widgets/instagram.pug +++ /dev/null @@ -1,27 +0,0 @@ -section#instagram_page.option-block - .some-block.option-block - h1(data-localise="__MSG_instagram__") Instagram - hr - - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#instagram-enable(type="checkbox") - - #bibliogram - hr - .normal - include ../../widgets/instances.pug - +instances('https://bibliogram.com') - include ../../widgets/latency.pug - +latency('bibliogram') - .tor - include ../../widgets/instances.pug - +instances('https://bibliogram.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://bibliogram.onion') - .loki - include ../../widgets/instances.pug - +instances('http://bibliogram.loki') - - script(type="module" src="./widgets/instagram.js") diff --git a/src/pages/options/widgets/lbry.js b/src/pages/options/widgets/lbry.js deleted file mode 100644 index d50de843..00000000 --- a/src/pages/options/widgets/lbry.js +++ /dev/null @@ -1,60 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -const frontends = new Array("librarian") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("lbry-enable") -const lbry = document.getElementById("lbry_page") -const redirectType = document.getElementById("lbry-redirect_type") -const frontend = document.getElementById("lbry-frontend") -let protocol - -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } -} - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableLbryTargets", "protocol", "lbryFrontend", "lbryRedirectType"], r => { - enable.checked = !r.disableLbryTargets - protocol = r.protocol - redirectType.value = r.lbryRedirectType - frontend.value = r.lbryFrontend - changeFrontendsSettings() - changeProtocolSettings() -}) - -lbry.addEventListener("change", () => { - browser.storage.local.set({ - disableLbryTargets: !enable.checked, - lbryRedirectType: redirectType.value, - lbryFrontend: frontend.value, - }) - changeFrontendsSettings() -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("lbryTargets", frontends[i], protocols[x], document) - } - utils.latency("lbryTargets", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/lbry.pug b/src/pages/options/widgets/lbry.pug deleted file mode 100644 index 327c938b..00000000 --- a/src/pages/options/widgets/lbry.pug +++ /dev/null @@ -1,38 +0,0 @@ -section#lbry_page.option-block - .some-block.option-block - h1(data-localise="__MSG_lbry__") LBRY - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#lbry-enable(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_frontend__") Frontend - select#lbry-frontend - option(value="librarian") Librarian - option(value="lbryDesktop" data-localise="__MSG_lbryDesktop__") LBRY Desktop - - .some-block.option-block - h4(data-localise="__MSG_redirectType__") Redirect Type - select#lbry-redirect_type - option(value="both" data-localise="__MSG_both__") both - option(value="main_frame" data-localise="__MSG_onlyNotEmbedded__") Only Not Embedded - - #librarian - hr - .normal - include ../../widgets/instances.pug - +instances('https://librarian.com') - include ../../widgets/latency.pug - +latency('librarian') - .tor - include ../../widgets/instances.pug - +instances('https://librarian.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://librarian.onion') - .loki - include ../../widgets/instances.pug - +instances('http://librarian.loki') - - script(type="module" src="./widgets/lbry.js") diff --git a/src/pages/options/widgets/maps.js b/src/pages/options/widgets/maps.js deleted file mode 100644 index acc8aca8..00000000 --- a/src/pages/options/widgets/maps.js +++ /dev/null @@ -1,57 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -const frontends = new Array("facil") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("maps-enable") -const maps = document.getElementById("maps_page") -const frontend = document.getElementById("maps-frontend") -let protocol - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } -} - -browser.storage.local.get(["disableMaps", "protocol", "mapsFrontend"], r => { - enable.checked = !r.disableMaps - protocol = r.protocol - frontend.value = r.mapsFrontend - changeFrontendsSettings() - changeProtocolSettings() -}) - -maps.addEventListener("change", () => { - browser.storage.local.set({ - disableMaps: !enable.checked, - mapsFrontend: frontend.value, - }) - changeFrontendsSettings() -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("maps", frontends[i], protocols[x], document) - } - utils.latency("maps", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/maps.pug b/src/pages/options/widgets/maps.pug deleted file mode 100644 index 166e6494..00000000 --- a/src/pages/options/widgets/maps.pug +++ /dev/null @@ -1,32 +0,0 @@ -section#maps_page.option-block - .some-block.option-block - h1(data-localise="__MSG_maps__") Maps - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#maps-enable(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_frontend__") Frontend - select#maps-frontend - option(value="osm") OpenStreetMap - option(value="facil") Facil Map - - #facil - hr - .normal - include ../../widgets/instances.pug - +instances('https://facilmap.com') - include ../../widgets/latency.pug - +latency('facil') - .tor - +instances('http://facilmap.onion') - include ../../widgets/instances.pug - .i2p - include ../../widgets/instances.pug - +instances('http://facilmap.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://facilmap.loki') - - script(type="module" src="./widgets/maps.js") diff --git a/src/pages/options/widgets/medium.js b/src/pages/options/widgets/medium.js deleted file mode 100644 index 8db5c0f0..00000000 --- a/src/pages/options/widgets/medium.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("scribe") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("medium-enable") -const medium = document.getElementById("medium_page") -//const frontend = document.getElementById("medium-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableMedium", "protocol"], r => { - enable.checked = !r.disableMedium - protocol = r.protocol - changeProtocolSettings() -}) - -medium.addEventListener("change", () => { - browser.storage.local.set({ disableMedium: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("medium", frontends[i], protocols[x], document) - } - utils.latency("medium", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/medium.pug b/src/pages/options/widgets/medium.pug deleted file mode 100644 index 4eef0511..00000000 --- a/src/pages/options/widgets/medium.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#medium_page.option-block - .some-block.option-block - h1(data-localise="__MSG_medium__") Medium - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#medium-enable(type="checkbox") - - #scribe - hr - .normal - include ../../widgets/instances.pug - +instances('https://scribe.com') - include ../../widgets/latency.pug - +latency('scribe') - .tor - include ../../widgets/instances.pug - +instances('http://scribe.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://scribe.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://scribe.loki') - - script(type="module" src="./widgets/medium.js") diff --git a/src/pages/options/widgets/peertube.js b/src/pages/options/widgets/peertube.js deleted file mode 100644 index e3b8dcc5..00000000 --- a/src/pages/options/widgets/peertube.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("simpleertube") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("peertube-enable") -const peertube = document.getElementById("peertube_page") -//const frontend = document.getElementById("peertube-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disablePeertubeTargets", "protocol"], r => { - enable.checked = !r.disablePeertubeTargets - protocol = r.protocol - changeProtocolSettings() -}) - -peertube.addEventListener("change", () => { - browser.storage.local.set({ disablePeertubeTargets: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("peertube", frontends[i], protocols[x], document) - } - utils.latency("peertube", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/peertube.pug b/src/pages/options/widgets/peertube.pug deleted file mode 100644 index 38690d04..00000000 --- a/src/pages/options/widgets/peertube.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#peertube_page.option-block - .some-block.option-block - h1(data-localise="__MSG_peertube__") PeerTube - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#peertube-enable(type="checkbox") - - #simpleertube - hr - .normal - include ../../widgets/instances.pug - +instances('https://simpleertube.com') - include ../../widgets/latency.pug - +latency('simpleertube') - .tor - include ../../widgets/instances.pug - +instances('http://simpleertube.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://simpleertube.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://simpleertube.loki') - - script(type="module" src="./widgets/peertube.js") diff --git a/src/pages/options/widgets/quora.js b/src/pages/options/widgets/quora.js deleted file mode 100644 index f3e361c3..00000000 --- a/src/pages/options/widgets/quora.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("quetre") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("quora-enable") -const quora = document.getElementById("quora_page") -//const frontend = document.getElementById("quora-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableQuora", "protocol"], r => { - enable.checked = !r.disableQuora - protocol = r.protocol - changeProtocolSettings() -}) - -quora.addEventListener("change", () => { - browser.storage.local.set({ disableQuora: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("quora", frontends[i], protocols[x], document) - } - utils.latency("quora", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/quora.pug b/src/pages/options/widgets/quora.pug deleted file mode 100644 index addfe280..00000000 --- a/src/pages/options/widgets/quora.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#quora_page.option-block - .some-block.option-block - h1() Quora - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#quora-enable(type="checkbox") - - #quetre - hr - .normal - include ../../widgets/instances.pug - +instances('https://quetre.com') - include ../../widgets/latency.pug - +latency('quetre') - .tor - include ../../widgets/instances.pug - +instances('http://quetre.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://quetre.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://quetre.loki') - - script(type="module" src="./widgets/quora.js") diff --git a/src/pages/options/widgets/reddit.js b/src/pages/options/widgets/reddit.js deleted file mode 100644 index c2d16fa3..00000000 --- a/src/pages/options/widgets/reddit.js +++ /dev/null @@ -1,57 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -const frontends = new Array("libreddit", "teddit") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("reddit-enable") -const reddit = document.getElementById("reddit_page") -const frontend = document.getElementById("reddit-frontend") -let protocol - -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } -} - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableReddit", "protocol", "redditFrontend"], r => { - enable.checked = !r.disableReddit - protocol = r.protocol - frontend.value = r.redditFrontend - changeFrontendsSettings() - changeProtocolSettings() -}) - -reddit.addEventListener("change", () => { - browser.storage.local.set({ - disableReddit: !enable.checked, - redditFrontend: frontend.value, - }) - changeFrontendsSettings() -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("reddit", frontends[i], protocols[x], document) - } - utils.latency("reddit", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/reddit.pug b/src/pages/options/widgets/reddit.pug deleted file mode 100644 index 1726f9ce..00000000 --- a/src/pages/options/widgets/reddit.pug +++ /dev/null @@ -1,48 +0,0 @@ -section#reddit_page.option-block - .some-block.option-block - h1(data-localise="__MSG_reddit__") Reddit - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#reddit-enable(type="checkbox") - - .some-block.option-block - h4#frontend(data-localise="__MSG_frontend__") Frontend - select#reddit-frontend - option(value="libreddit") Libreddit - option(value="teddit") Teddit - - #libreddit - hr - .normal - include ../../widgets/instances.pug - +instances('https://libreddit.com') - include ../../widgets/latency.pug - +latency('libreddit') - .tor - include ../../widgets/instances.pug - +instances('http://libreddit.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://libreddit.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://libreddit.loki') - - #teddit - hr - .normal - include ../../widgets/instances.pug - +instances('https://teddit.com') - +latency('teddit') - .tor - include ../../widgets/instances.pug - +instances('http://teddit.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://teddit.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://teddit.loki') - - script(type="module" src="./widgets/reddit.js") diff --git a/src/pages/options/widgets/reuters.js b/src/pages/options/widgets/reuters.js deleted file mode 100644 index d8c937e4..00000000 --- a/src/pages/options/widgets/reuters.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("neuters") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("reuters-enable") -const reuters = document.getElementById("reuters_page") -//const frontend = document.getElementById("reuters-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableReuters", "protocol"], r => { - enable.checked = !r.disableReuters - protocol = r.protocol - changeProtocolSettings() -}) - -reuters.addEventListener("change", () => { - browser.storage.local.set({ disableReuters: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("reuters", frontends[i], protocols[x], document) - } - utils.latency("reuters", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/reuters.pug b/src/pages/options/widgets/reuters.pug deleted file mode 100644 index 9ed6b3b9..00000000 --- a/src/pages/options/widgets/reuters.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#reuters_page.option-block - .some-block.option-block - h1() Reuters - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#reuters-enable(type="checkbox") - - #neuters - hr - .normal - include ../../widgets/instances.pug - +instances('https://neuters.com') - include ../../widgets/latency.pug - +latency('neuters') - .tor - include ../../widgets/instances.pug - +instances('http://neuters.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://neuters.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://neuters.loki') - - script(type="module" src="./widgets/reuters.js") diff --git a/src/pages/options/widgets/search.js b/src/pages/options/widgets/search.js deleted file mode 100644 index 3301cd70..00000000 --- a/src/pages/options/widgets/search.js +++ /dev/null @@ -1,204 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// GOAL: to never mention frontends/protocls outside these two arrays, so that adding a new frontend/protocol is as easy as adding it here. -// This may be expanded across the whole project, where almost everything becomes a template, and the frontend/protocol parts just become a JSON file. - -// ONCE FINISHED: add librex and see if it works -const frontends = new Array("searx", "searxng", "whoogle", "librex") // Add librex once /javascripts/search.js is made agnostic -const protocols = new Array("normal", "tor", "i2p", "loki") -//let frontendProtocols = (frontends.length) - -// I will leave comments of my privious attemps so that people can learn from my mistakes. :) - -/* -for (let i = 0; i < frontends.length; i++) { - this.frontends[i] = frontends[i].getElementsByClassName(protocol) -} -*/ -// There was a class here, but I deleted a bit of it -/* - this.searxDiv = searxDiv.getElementsByClassName(protocol)[0]; - this.searxngDiv = searxngDiv.getElementsByClassName(protocol)[0]; - this.librexDiv = librexDiv.getElementsByClassName(protocol)[0]; - */ - -/* - * Here I was trying to solve the issue by making a 2D array, but I later realised I was overcomplicating things -for (var i = 0; i < frontends.length; i++) { - frontendProtocols[i] = new Array(protocols.length) -} -*/ - -/* -const searxDiv = document.getElementById("searx"); -const searxngDiv = document.getElementById("searxng"); -const whoogleDiv = document.getElementById("whoogle"); -*/ - -const enable = document.getElementById("search-enable") -const search = document.getElementById("search_page") -const frontend = document.getElementById("search-frontend") -let protocol - -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } - - /* - if (frontend.value == 'searx') { - searxDiv.style.display = 'block'; - searxngDiv.style.display = 'none'; - whoogleDiv.style.display = 'none'; - librexDiv.style.display = 'none'; - } - else if (frontend.value == 'searxng') { - searxDiv.style.display = 'none'; - searxngDiv.style.display = 'block'; - whoogleDiv.style.display = 'none'; - librexDiv.style.display = 'none'; - } - else if (frontend.value == 'whoogle') { - searxDiv.style.display = 'none'; - searxngDiv.style.display = 'none'; - whoogleDiv.style.display = 'block'; - librexDiv.style.display = 'none'; - } - else if (frontend.value == 'librex') { - searxDiv.style.display = 'none'; - searxDiv.style.display = 'none'; - searxngDiv.style.display = 'none'; - librexDiv.style.display = 'block'; - } - */ -} - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - //if (frontends[i] == frontend.value) { // Here we are checking if the frontend matches the current one. This skips the protocol checking for that frontend, speeding things up. I no longer do this as protocol setting is only set once in the ui so every frontend needs to get their protocols setup immidiately. - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - //if the frontend value equals the selected one, it will show. Otherwise, it will be hidden - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - /* - } else { - continue - } - */ - } - - /* - * "Legacy" code - const normalsearxDiv = searxDiv.getElementsByClassName("normal")[0]; - const torsearxDiv = searxDiv.getElementsByClassName("tor")[0]; - const i2psearxDiv = searxDiv.getElementsByClassName("i2p")[0]; - - const normalsearxngDiv = searxngDiv.getElementsByClassName("normal")[0]; - const torsearxngDiv = searxngDiv.getElementsByClassName("tor")[0]; - const i2psearxngDiv = searxngDiv.getElementsByClassName("i2p")[0]; - - const torwhoogleDiv = whoogleDiv.getElementsByClassName("tor")[0]; - const i2pwhoogleDiv = whoogleDiv.getElementsByClassName("i2p")[0]; - const normalwhoogleDiv = whoogleDiv.getElementsByClassName("normal")[0]; - - - function protocolDisplay(proto) { - proto.searxngDiv = 'block' - } - - protocolDisplay(protocol.value) - - - if (protocol.value == 'normal') { - normalsearxDiv.style.display = 'block'; - normalsearxngDiv.style.display = 'block'; - normalwhoogleDiv.style.display = 'block'; - - torsearxDiv.style.display = 'none'; - torsearxngDiv.style.display = 'none'; - torwhoogleDiv.style.display = 'none'; - - i2psearxDiv.style.display = 'none'; - i2psearxngDiv.style.display = 'none'; - i2pwhoogleDiv.style.display = 'none'; - } - else if (protocol.value == 'tor') { - normalsearxDiv.style.display = 'none'; - normalsearxngDiv.style.display = 'none'; - normalwhoogleDiv.style.display = 'none'; - - torsearxDiv.style.display = 'block'; - torsearxngDiv.style.display = 'block'; - torwhoogleDiv.style.display = 'block'; - - i2psearxDiv.style.display = 'none'; - i2psearxngDiv.style.display = 'none'; - i2pwhoogleDiv.style.display = 'none'; - } - else if (protocol.value == 'i2p') { - normalsearxDiv.style.display = 'none'; - normalsearxngDiv.style.display = 'none'; - normalwhoogleDiv.style.display = 'none'; - - torsearxDiv.style.display = 'none'; - torsearxngDiv.style.display = 'none'; - torwhoogleDiv.style.display = 'none'; - - i2psearxDiv.style.display = 'block'; - i2psearxngDiv.style.display = 'block'; - i2pwhoogleDiv.style.display = 'block'; - } - */ -} - -browser.storage.local.get(["disableSearch", "searchFrontend", "protocol"], r => { - enable.checked = !r.disableSearch - frontend.value = r.searchFrontend - protocol = r.protocol - - changeFrontendsSettings() - changeProtocolSettings() -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("search", frontends[i], protocols[x], document) - } - utils.latency("search", frontends[i], document, location) -} - -search.addEventListener("change", () => { - browser.storage.local.set({ - disableSearch: !enable.checked, - searchFrontend: frontend.value, - }) - changeFrontendsSettings() -}) - -/* - * more "legacy" code -utils.processDefaultCustomInstances('search', 'searx', 'normal', document); -utils.processDefaultCustomInstances('search', 'searx', 'tor', document); -utils.processDefaultCustomInstances('search', 'searx', 'i2p', document); -utils.processDefaultCustomInstances('search', 'searxng', 'normal', document); -utils.processDefaultCustomInstances('search', 'searxng', 'tor', document); -utils.processDefaultCustomInstances('search', 'searxng', 'i2p', document); -utils.processDefaultCustomInstances('search', 'whoogle', 'normal', document); -utils.processDefaultCustomInstances('search', 'whoogle', 'tor', document); -utils.processDefaultCustomInstances('search', 'whoogle', 'i2p', document); - -utils.latency('search', 'searx', document, location, true) -utils.latency('search', 'searxng', document, location, true) -utils.latency('search', 'whoogle', document, location, true) -*/ diff --git a/src/pages/options/widgets/search.pug b/src/pages/options/widgets/search.pug deleted file mode 100644 index 8f23350e..00000000 --- a/src/pages/options/widgets/search.pug +++ /dev/null @@ -1,85 +0,0 @@ -section#search_page.option-block - .some-block.option-block - h1(data-localise="__MSG_search__") Search - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#search-enable(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_frontend__") Frontend - select#search-frontend - option(value="searxng") SearXNG - option(value="searx") SearX - option(value="whoogle") Whoogle - option(value="librex") LibreX - - .some-block - h4(data-localise="__MSG_searchNote__") Note: To use Search, make LibRedirect the Default Search Engine - - #searx - hr - .normal - include ../../widgets/instances.pug - +instances('https://searx.com') - include ../../widgets/latency.pug - +latency('searx') - .tor - include ../../widgets/instances.pug - +instances('http://searx.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://searx.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://searx.loki') - - #searxng - hr - .normal - include ../../widgets/instances.pug - +instances('https://searxng.com') - +latency('searxng') - .tor - include ../../widgets/instances.pug - +instances('http://searxng.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://searxng.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://searxng.loki') - - #whoogle - hr - .normal - include ../../widgets/instances.pug - +instances('https://whoogle.com') - +latency('whoogle') - .tor - include ../../widgets/instances.pug - +instances('http://whoogle.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://whoogle.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://whoogle.loki') - - #librex - hr - .normal - include ../../widgets/instances.pug - +instances('https://librex.com') - +latency('librex') - .tor - include ../../widgets/instances.pug - +instances('http://librex.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://librex.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://librex.loki') - - script(type="module" src="./widgets/search.js") diff --git a/src/pages/options/widgets/sendTargets.js b/src/pages/options/widgets/sendTargets.js deleted file mode 100644 index 9380a72f..00000000 --- a/src/pages/options/widgets/sendTargets.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("send") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("sendTargets-enable") -const sendTargets = document.getElementById("sendTargets_page") -//const frontend = document.getElementById("sendTargets-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableSendTarget", "protocol"], r => { - enable.checked = !r.disableSendTarget - protocol = r.protocol - changeProtocolSettings() -}) - -sendTargets.addEventListener("change", () => { - browser.storage.local.set({ disableSendTarget: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("sendTargets", frontends[i], protocols[x], document) - } - utils.latency("sendTargets", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/sendTargets.pug b/src/pages/options/widgets/sendTargets.pug deleted file mode 100644 index fc2e9e73..00000000 --- a/src/pages/options/widgets/sendTargets.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#sendTargets_page.option-block - .some-block.option-block - h1(data-localise="__MSG_sendFiles__") Send Files - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#sendTargets-enable(type="checkbox") - - #send - hr - .normal - include ../../widgets/instances.pug - +instances('https://send.com') - include ../../widgets/latency.pug - +latency('send') - .tor - include ../../widgets/instances.pug - +instances('http://send.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://send.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://send.loki') - - script(type="module" src="./widgets/sendTargets.js") diff --git a/src/pages/options/widgets/services.ejs b/src/pages/options/widgets/services.ejs new file mode 100644 index 00000000..44c6a9f3 --- /dev/null +++ b/src/pages/options/widgets/services.ejs @@ -0,0 +1,86 @@ +<% for (const service in config.services) { -%> +<section class="option-block" id="<%= service %>_page"> + <div class="some-block option-block"> + <h1 data-localise="__MSG_<%= service %>__"><%= config.services[service].name %></h1> + </div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_enable__">Enable</h4> + <input id="<%= service %>-enabled" type="checkbox"> + </div> + <% if (Object.keys(config.services[service].frontends).length > 1) { %> + <div class="some-block option-block"> + <h4 data-localise="__MSG_frontend__">Frontend</h4> + <select id="<%= service %>-frontend"> + <% for (const frontend in config.services[service].frontends) { -%> + <option value="<%= frontend %>"><%= config.services[service].frontends[frontend].name %></option> + <% } %> + </select> + </div> + <% if (config.services[service].embeddable) { _%> + <div class="some-block option-block"> + <h4 data-localise="__MSG_embed_frontend__">Embed Frontend</h4> + <select id="<%= service %>-embedFrontend"> + <% for (const frontend in config.services[service].frontends) { -%> + <% if (config.services[service].frontends[frontend].embeddable) { _%> + <option value="<%= frontend %>"><%= config.services[service].frontends[frontend].name %></option> + <% } _%> + <% } %> + </select> + </div> + <% } _%> + <% } _%> + <% if (config.services[service].embeddable) { _%> + <div class="some-block option-block"> + <h4 data-localise="__MSG_redirectType__">Redirect Type</h4> + <select id="<%= service %>-redirectType"> + <option value="both" data-localise="__MSG_both__">both</option> + <option value="sub_frame" data-localise="__MSG_onlyEmbedded__">Only Embedded</option> + <option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option> + </select> + </div> + <% } _%> + <hr> + <% for (const frontend in config.services[service].frontends) { -%> + <% if (config.services[service].frontends[frontend].instanceList) { _%> + <div id="<%= frontend %>"> + <% for (const network in config.networks) { -%> + <div class="<%= network %>"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist"></div> + <hr> + <div class="some-block option-block"> + <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> + </div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="http://<%= frontend %>.<%= config.networks[network].tld %>" type="url"> + <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> + <% if (network == "clearnet") { _%> + <div class="buttons buttons-inline"> + <label class="button button-inline" id="latency-<%= frontend %>-label" for="latency-<%= frontend %>"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path> + </svg> + <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x> + </label> + <input class="button button-inline" id="latency-<%= frontend %>" style="display:none;"> + </div> + <% } _%> + </div> + <% } %> + </div> + <% } _%> + <% } %> +</section> +<% } %> +<script type="module" src="./widgets/services.js"></script> diff --git a/src/pages/options/widgets/services.js b/src/pages/options/widgets/services.js new file mode 100644 index 00000000..eb7f1ba7 --- /dev/null +++ b/src/pages/options/widgets/services.js @@ -0,0 +1,107 @@ +import utils from "../../../assets/javascripts/utils.js" + +let config, + options, + divs = {} + +function getConfig() { + return new Promise(resolve => { + fetch("/config/config.json") + .then(response => response.text()) + .then(data => { + config = JSON.parse(data) + resolve() + }) + }) +} + +function getOptions() { + return new Promise(resolve => { + browser.storage.local.get("options", r => { + options = r.options + resolve() + }) + }) +} + +await getConfig() +await getOptions() + +function changeFrontendsSettings(service) { + for (const frontend in config.services[service].frontends) { + if (config.services[service].frontends[frontend].instanceList) { + const frontendDiv = document.getElementById(frontend) + if (frontend == divs[service].frontend.value) { + frontendDiv.style.display = "block" + } else { + frontendDiv.style.display = "none" + } + } + } + + if (config.services[service].embeddable) { + if (!config.services[service].frontends[divs[service].frontend.value].embeddable) { + divs[service].embedFrontend.disabled = false + for (const frontend in config.services[service].frontends) { + if (config.services[service].frontends[frontend].embeddable) { + const frontendDiv = document.getElementById(frontend) + if (frontend == divs[service].embedFrontend.value) { + frontendDiv.style.display = "block" + } else { + frontendDiv.style.display = "none" + } + } + } + } else if (Object.keys(config.services[service].frontends).length > 1) divs[service].embedFrontend.disabled = true + } +} + +function changeNetworkSettings() { + for (const service in config.services) { + for (const frontend in config.services[service].frontends) { + if (config.services[service].frontends[frontend].instanceList) { + const frontendDiv = document.getElementById(frontend) + for (const network in config.networks) { + const networkDiv = frontendDiv.getElementsByClassName(network)[0] + if (network == options.network) { + networkDiv.style.display = "block" + } else { + networkDiv.style.display = "none" + } + } + } + } + } +} + +changeNetworkSettings() +for (const service in config.services) { + divs[service] = {} + //divs[service].page = document.getElementById(`${service}_page`) + for (const option in config.services[service].options) { + divs[service][option] = document.getElementById(`${service}-${option}`) + + if (typeof config.services[service].options[option] == "boolean") divs[service][option].checked = options[service][option] + else divs[service][option].value = options[service][option] + + divs[service][option].addEventListener("change", () => { + if (typeof config.services[service].options[option] == "boolean") options[service][option] = divs[service][option].checked + else options[service][option] = divs[service][option].value + browser.storage.local.set({ options }) + changeFrontendsSettings(service) + }) + } + + if (Object.keys(config.services[service].frontends).length > 1) { + changeFrontendsSettings(service) + } + + for (const frontend in config.services[service].frontends) { + if (config.services[service].frontends[frontend].instanceList) { + for (const network in config.networks) { + utils.processDefaultCustomInstances(service, frontend, network, document) + } + utils.latency(service, frontend, document, location) + } + } +} diff --git a/src/pages/options/widgets/tiktok.js b/src/pages/options/widgets/tiktok.js deleted file mode 100644 index 38ec9ea0..00000000 --- a/src/pages/options/widgets/tiktok.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("proxiTok") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("tiktok-enable") -const tiktok = document.getElementById("tiktok_page") -//const frontend = document.getElementById("tiktok-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableTiktok", "protocol"], r => { - enable.checked = !r.disableTiktok - protocol = r.protocol - changeProtocolSettings() -}) - -tiktok.addEventListener("change", () => { - browser.storage.local.set({ disableTiktok: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("tiktok", frontends[i], protocols[x], document) - } - utils.latency("tiktok", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/tiktok.pug b/src/pages/options/widgets/tiktok.pug deleted file mode 100644 index 29ab5e2a..00000000 --- a/src/pages/options/widgets/tiktok.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#tiktok_page.option-block - .some-block.option-block - h1(data-localise="__MSG_tiktok__") TikTok - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#tiktok-enable(type="checkbox") - - #proxiTok - hr - .normal - include ../../widgets/instances.pug - +instances('https://proxitok.com') - include ../../widgets/latency.pug - +latency('proxiTok') - .tor - include ../../widgets/instances.pug - +instances('http://proxitok.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://proxitok.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://proxitok.loki') - - script(type="module" src="./widgets/tiktok.js") diff --git a/src/pages/options/widgets/translate.js b/src/pages/options/widgets/translate.js deleted file mode 100644 index e1008139..00000000 --- a/src/pages/options/widgets/translate.js +++ /dev/null @@ -1,57 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -const frontends = new Array("simplyTranslate", "lingva") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("translate-enable") -const translate = document.getElementById("translate_page") -const frontend = document.getElementById("translate-frontend") -let protocol - -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } -} - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["translateDisable", "translateFrontend", "protocol"], r => { - enable.checked = !r.translateDisable - frontend.value = r.translateFrontend - protocol = r.protocol - changeFrontendsSettings() - changeProtocolSettings() -}) - -translate.addEventListener("change", () => { - browser.storage.local.set({ - translateDisable: !enable.checked, - translateFrontend: frontend.value, - }) - changeFrontendsSettings() -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("translate", frontends[i], protocols[x], document) - } - utils.latency("translate", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/translate.pug b/src/pages/options/widgets/translate.pug deleted file mode 100644 index 4836c0f3..00000000 --- a/src/pages/options/widgets/translate.pug +++ /dev/null @@ -1,48 +0,0 @@ -section#translate_page.option-block - .some-block.option-block - h1(data-localise="__MSG_translate__") Translate - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#translate-enable(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_frontend__") Frontend - select#translate-frontend - option(value="simplyTranslate") SimplyTranslate - option(value="lingva") Lingva - - hr - #simplyTranslate - .normal - include ../../widgets/instances.pug - +instances('https://simplytranslate.org') - include ../../widgets/latency.pug - +latency('simplyTranslate') - .tor - include ../../widgets/instances.pug - +instances('http://hxecvvetgrznmprg.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://simplytranslate.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://simplytranslate.loki') - - #lingva - .normal - include ../../widgets/instances.pug - +instances('https://lingvatranslate.com') - +latency('lingva') - .tor - include ../../widgets/instances.pug - +instances('http://lingvatranslate.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://lingvatranslate.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://lingvatranslate.loki') - - - script(type="module" src="./widgets/translate.js") diff --git a/src/pages/options/widgets/twitter.js b/src/pages/options/widgets/twitter.js deleted file mode 100644 index 5ad760b3..00000000 --- a/src/pages/options/widgets/twitter.js +++ /dev/null @@ -1,60 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("nitter") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("twitter-enable") -const twitter = document.getElementById("twitter_page") -const redirectType = document.getElementById("twitter-redirect_type") -//const frontend = document.getElementById("twitter-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableTwitter", "protocol", "twitterRedirectType"], r => { - enable.checked = !r.disableTwitter - protocol = r.protocol - redirectType.value = r.twitterRedirectType - changeProtocolSettings() -}) - -twitter.addEventListener("change", () => { - browser.storage.local.set({ - disableTwitter: !enable.checked, - twitterRedirectType: redirectType.value, - }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("twitter", frontends[i], protocols[x], document) - } - utils.latency("twitter", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/twitter.pug b/src/pages/options/widgets/twitter.pug deleted file mode 100644 index 137e1efb..00000000 --- a/src/pages/options/widgets/twitter.pug +++ /dev/null @@ -1,32 +0,0 @@ -section#twitter_page.option-block - .some-block.option-block - h1(data-localise="__MSG_twitter__") Twitter - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#twitter-enable(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_redirectType__") Redirect Type - select#twitter-redirect_type - option(value="both" data-localise="__MSG_both__") both - option(value="main_frame" data-localise="__MSG_onlyNotEmbedded__") Only Not Embedded - - #nitter - hr - .normal - include ../../widgets/instances.pug - +instances('https://nitter.com') - include ../../widgets/latency.pug - +latency('nitter') - .tor - include ../../widgets/instances.pug - +instances('http://nitter.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://nitter.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://nitter.loki') - - script(type="module" src="./widgets/twitter.js") diff --git a/src/pages/options/widgets/wikipedia.js b/src/pages/options/widgets/wikipedia.js deleted file mode 100644 index 9d06488b..00000000 --- a/src/pages/options/widgets/wikipedia.js +++ /dev/null @@ -1,55 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -// UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST - -const frontends = new Array("wikiless") -const protocols = new Array("normal", "tor", "i2p", "loki") - -const enable = document.getElementById("wikipedia-enable") -const wikipedia = document.getElementById("wikipedia_page") -//const frontend = document.getElementById("wikipedia-frontend"); -let protocol - -/* -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = 'block' - } else { - frontendDiv.style.display = 'none' - } - } -} -*/ - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableWikipedia", "protocol"], r => { - enable.checked = !r.disableWikipedia - protocol = r.protocol - changeProtocolSettings() -}) - -wikipedia.addEventListener("change", () => { - browser.storage.local.set({ disableWikipedia: !enable.checked }) -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("wikipedia", frontends[i], protocols[x], document) - } - utils.latency("wikipedia", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/wikipedia.pug b/src/pages/options/widgets/wikipedia.pug deleted file mode 100644 index c9aee64c..00000000 --- a/src/pages/options/widgets/wikipedia.pug +++ /dev/null @@ -1,26 +0,0 @@ -section#wikipedia_page.option-block - .some-block.option-block - h1(data-localise="__MSG_wikipedia__") Wikipedia - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#wikipedia-enable(type="checkbox") - - #wikiless - hr - .normal - include ../../widgets/instances.pug - +instances('https://wikiless.com') - include ../../widgets/latency.pug - +latency('wikiless') - .tor - include ../../widgets/instances.pug - +instances('http://wikiless.onion') - .i2p - include ../../widgets/instances.pug - +instances('https://wikiless.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://wikiless.loki') - - script(type="module" src="./widgets/wikipedia.js") diff --git a/src/pages/options/widgets/youtube.js b/src/pages/options/widgets/youtube.js deleted file mode 100644 index 065a195b..00000000 --- a/src/pages/options/widgets/youtube.js +++ /dev/null @@ -1,92 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -const frontends = new Array("invidious", "piped", "pipedMaterial", "cloudtube") -const protocols = new Array("normal", "tor", "i2p", "loki") -const singleInstanceFrontends = new Array("freetube", "yatte") - -const enable = document.getElementById("youtube-enable") -const youtube = document.getElementById("youtube_page") -const youtubeEmbedFrontend = document.getElementById("youtube-embed_frontend") -const onlyEmbeddedVideo = document.getElementById("youtube-redirect_type") -const embeddedFrontendDiv = document.getElementById("youtube-embedded_frontend") -const frontend = document.getElementById("youtube-frontend") -let protocol - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -function changeEmbedFrontendsSettings() { - if (embeddedFrontendDiv.style.display == "block") { - for (let i = 0; i < frontends.length; i++) { - const embeddedFrontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == youtubeEmbedFrontend.value) { - embeddedFrontendDiv.style.display = "block" - } else { - embeddedFrontendDiv.style.display = "none" - } - } - } -} - -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } - let singleInstanceFrontend = false - for (let i = 0; i < singleInstanceFrontends.length; i++) { - if (singleInstanceFrontends[i] == frontend.value) { - singleInstanceFrontend = true - } - } - if (singleInstanceFrontend == true) { - embeddedFrontendDiv.style.display = "block" - } else { - embeddedFrontendDiv.style.display = "none" - } -} - -browser.storage.local.get(["disableYoutube", "onlyEmbeddedVideo", "youtubeRedirects", "youtubeFrontend", "youtubeEmbedFrontend", "protocol"], r => { - enable.checked = !r.disableYoutube - onlyEmbeddedVideo.value = r.onlyEmbeddedVideo - youtubeEmbedFrontend.value = r.youtubeEmbedFrontend - frontend.value = r.youtubeFrontend - protocol = r.protocol - - changeFrontendsSettings() - changeProtocolSettings() - changeEmbedFrontendsSettings() -}) - -youtube.addEventListener("change", () => { - browser.storage.local.set({ - disableYoutube: !enable.checked, - youtubeEmbedFrontend: youtubeEmbedFrontend.value, - youtubeFrontend: frontend.value, - onlyEmbeddedVideo: onlyEmbeddedVideo.value, - }) - changeFrontendsSettings() - changeEmbedFrontendsSettings() -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("youtube", frontends[i], protocols[x], document) - } - utils.latency("youtube", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/youtube.pug b/src/pages/options/widgets/youtube.pug deleted file mode 100644 index 66faa60a..00000000 --- a/src/pages/options/widgets/youtube.pug +++ /dev/null @@ -1,102 +0,0 @@ -section#youtube_page.option-block - .some-block.option-block - h1(data-localise="__MSG_youtube__") YouTube - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#youtube-enable(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_frontend__") Frontend - select#youtube-frontend - option(value="invidious") Invidious - option(value="piped") Piped - option(value="pipedMaterial") Piped-Material - option(value="cloudtube") CloudTube - option(value="freetube") FreeTube - option(value="yatte") Yattee - - #youtube-embedded_frontend - .some-block.option-block - h4(data-localise="__MSG_embeddedVids__") Embedded Videos Frontend - select#youtube-embed_frontend - option(value="invidious") Invidious - option(value="piped") Piped - option(value="pipedMaterial") Piped-Material - option(value="cloudtube") CloudTube - - .some-block.option-block - h4(data-localise="__MSG_redirectType__") Redirect Type - select#youtube-redirect_type - option(value="both" data-localise="__MSG_both__") both - option(value="onlyNotEmbedded" data-localise="__MSG_onlyNotEmbedded__") Only Not Embedded - - #invidious - hr - .normal - include ../../widgets/instances.pug - +instances('http://invidious.com') - include ../../widgets/latency.pug - +latency('invidious') - .tor - include ../../widgets/instances.pug - +instances('http://invidious.onion') - .i2p - include ../../widgets/instances.pug - +instances('http://invidious.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://invidious.loki') - - #piped - hr - .normal - include ../../widgets/instances.pug - +instances('https://piped.com') - include ../../widgets/latency.pug - +latency('piped') - .tor - +instances('http://piped.onion') - include ../../widgets/instances.pug - .i2p - include ../../widgets/instances.pug - +instances('http://piped.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://piped.loki') - - #pipedMaterial - hr - .normal - include ../../widgets/instances.pug - +instances('https://piped-material.com') - include ../../widgets/latency.pug - +latency('pipedMaterial') - .tor - +instances('http://piped-material.onion') - include ../../widgets/instances.pug - .i2p - include ../../widgets/instances.pug - +instances('http://piped-material.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://piped-material.loki') - - #cloudtube - hr - .normal - include ../../widgets/instances.pug - +instances('https://cloudtube.com') - include ../../widgets/latency.pug - +latency('cloudtube') - .tor - +instances('http://cloudtube.onion') - include ../../widgets/instances.pug - .i2p - include ../../widgets/instances.pug - +instances('http://cloudtube.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://cloudtube.loki') - - script(type="module" src="./widgets/youtube.js") diff --git a/src/pages/options/widgets/youtubeMusic.js b/src/pages/options/widgets/youtubeMusic.js deleted file mode 100644 index ad51ce7c..00000000 --- a/src/pages/options/widgets/youtubeMusic.js +++ /dev/null @@ -1,57 +0,0 @@ -import utils from "../../../assets/javascripts/utils.js" - -const frontends = new Array("beatbump", "hyperpipe") -const protocols = new Array("normal", "tor", "i2p", "loki") - -let enable = document.getElementById("youtubeMusic-enable") -const youtubeMusic = document.getElementById("youtubeMusic_page") -const frontend = document.getElementById("youtubeMusic-frontend") -let protocol - -function changeFrontendsSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - if (frontends[i] == frontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } -} - -function changeProtocolSettings() { - for (let i = 0; i < frontends.length; i++) { - const frontendDiv = document.getElementById(frontends[i]) - for (let x = 0; x < protocols.length; x++) { - const protocolDiv = frontendDiv.getElementsByClassName(protocols[x])[0] - if (protocols[x] == protocol) { - protocolDiv.style.display = "block" - } else { - protocolDiv.style.display = "none" - } - } - } -} - -browser.storage.local.get(["disableYoutubeMusic", "youtubeMusicFrontend", "protocol"], r => { - enable.checked = !r.disableYoutubeMusic - frontend.value = r.youtubeMusicFrontend - protocol = r.protocol - changeFrontendsSettings() - changeProtocolSettings() -}) - -youtubeMusic.addEventListener("change", () => { - browser.storage.local.set({ - disableYoutubeMusic: !enable.checked, - youtubeMusicFrontend: frontend.value, - }) - changeFrontendsSettings() -}) - -for (let i = 0; i < frontends.length; i++) { - for (let x = 0; x < protocols.length; x++) { - utils.processDefaultCustomInstances("youtubeMusic", frontends[i], protocols[x], document) - } - utils.latency("youtubeMusic", frontends[i], document, location) -} diff --git a/src/pages/options/widgets/youtubeMusic.pug b/src/pages/options/widgets/youtubeMusic.pug deleted file mode 100644 index bcba3d2d..00000000 --- a/src/pages/options/widgets/youtubeMusic.pug +++ /dev/null @@ -1,49 +0,0 @@ -section#youtubeMusic_page.option-block - .some-block.option-block - h1(data-localise="__MSG_ytmusic__") YouTube Music - hr - .some-block.option-block - h4(data-localise="__MSG_enable__") Enable - input#youtubeMusic-enable(type="checkbox") - - .some-block.option-block - h4(data-localise="__MSG_frontend__") Frontend - select#youtubeMusic-frontend - option(value="beatbump") Beatbump - option(value="hyperpipe") Hyperpipe - - #beatbump - hr - .normal - include ../../widgets/instances.pug - +instances('https://beatbump.org') - include ../../widgets/latency.pug - +latency('beatbump') - .tor - +instances('http://beatbump.onion') - include ../../widgets/instances.pug - .i2p - include ../../widgets/instances.pug - +instances('http://beatbump.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://beatbump.loki') - - #hyperpipe - hr - .normal - include ../../widgets/instances.pug - +instances('https://hyperpipe.org') - include ../../widgets/latency.pug - +latency('hyperpipe') - .tor - +instances('http://hyperpipe.onion') - include ../../widgets/instances.pug - .i2p - include ../../widgets/instances.pug - +instances('http://hyperpipe.i2p') - .loki - include ../../widgets/instances.pug - +instances('http://hyperpipe.loki') - - script(type="module" src="./widgets/youtubeMusic.js") diff --git a/src/pages/popup/popup.ejs b/src/pages/popup/popup.ejs new file mode 100644 index 00000000..e862e0cb --- /dev/null +++ b/src/pages/popup/popup.ejs @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link href="../stylesheets/styles.css" rel="stylesheet"> + <link href="./style.css" rel="stylesheet"> + </head> + <body dir="auto"> + <div class="current_site"> + <%- include('src/pages/widgets/switches', {services: services}) -%> + <div id="current_site_divider"> + <hr> + </div> + </div> + <div class="all_sites"> + <%- include('src/pages/widgets/switches', {services: services}) -%> + </div> + <hr> + <div class="some-block" id="change_instance_div"><a class="title button prevent" id="change_instance"> + <h4 data-localise="__MSG_switchInstance__">Change Instance</h4> + <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"></path> + </svg></a></div> + <div class="some-block" id="copy_raw_div" title="Copy the original redirected link"> <a class="title button prevent" id="copy_raw"> + <h4 data-localise="__MSG_copyRaw__">Copy Raw</h4> + <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"></path> + </svg></a></div> + <div class="some-block" id="unify_div" title="Unify preferences across all selected instances"><a class="title button prevent" id="unify"> + <h4 data-localise="__MSG_unifySettings__">Unify Settings</h4> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path> + </svg></a></div> + <div class="some-block"><a class="title button prevent" id="more-options"> + <h4 data-localise="__MSG_settings__">Settings</h4> + <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"></path> + </svg></a></div> + <div class="some-block"><a class="title button" id="about" href="/pages/options/index.html#about"> + <h4 data-localise="__MSG_about__">About</h4> + <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="currentColor"> + <path d="M11 17h2v-6h-2Zm1-8q.425 0 .713-.288Q13 8.425 13 8t-.287-.713Q12.425 7 12 7t-.712.287Q11 7.575 11 8t.288.712Q11.575 9 12 9Zm0 13q-2.075 0-3.9-.788-1.825-.787-3.175-2.137-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175 1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138 1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175-1.35 1.35-3.175 2.137Q14.075 22 12 22Zm0-2q3.35 0 5.675-2.325Q20 15.35 20 12q0-3.35-2.325-5.675Q15.35 4 12 4 8.65 4 6.325 6.325 4 8.65 4 12q0 3a.35 2.325 5.675Q8.65 20 12 20Zm0-8Z"></path> + </svg></a></div> + <div class="space"></div> + <script type="module" src="../options/init.js"></script> + <script type="module" src="./popup.js"></script> + </body> +</html> diff --git a/src/pages/popup/popup.html b/src/pages/popup/popup.html index 1c3f6ea2..54c4fefa 100644 --- a/src/pages/popup/popup.html +++ b/src/pages/popup/popup.html @@ -8,189 +8,227 @@ </head> <body dir="auto"> <div class="current_site"> - <div class="youtube some-block"><a class="title" href="https://youtube.com"><img src="../../assets/images/youtube-icon.png"/> - <h4 data-localise="__MSG_youtube__">YouTube</h4></a> - <input class="disable-youtube" type="checkbox"/> - </div> - <div class="youtubeMusic some-block"><a class="title" href="https://music.youtube.com"><img src="../../assets/images/youtube-music-icon.png"/> - <h4 data-localise="__MSG_ytmusic__">YT Music</h4></a> - <input class="disable-youtubeMusic" type="checkbox"/> - </div> - <div class="twitter some-block"><a class="title" href="https://twitter.com"><img src="../../assets/images/twitter-icon.png"/> - <h4 data-localise="__MSG_twitter__">Twitter</h4></a> - <input class="disable-nitter" type="checkbox"/> - </div> - <div class="instagram some-block"><a class="title" href="https://instagram.com"><img src="../../assets/images/instagram-icon.png"/> - <h4 data-localise="__MSG_instagram__">Instagram</h4></a> - <input class="disable-bibliogram" type="checkbox"/> - </div> - <div class="tiktok some-block"><a class="title" href="https://tiktok.com"><img src="../../assets/images/tiktok-icon.png"/> - <h4 data-localise="__MSG_tiktok__">TikTok</h4></a> - <input class="disable-tiktok" type="checkbox"/> - </div> - <div class="imgur some-block"><a class="title" href="https://imgur.com"><img src="../../assets/images/imgur.png"/> - <h4 data-localise="__MSG_imgur__">Imgur</h4></a> - <input class="disable-imgur" type="checkbox"/> - </div> - <div class="reddit some-block"><a class="title" href="https://reddit.com"><img src="../../assets/images/reddit-icon.png"/> - <h4 data-localise="__MSG_reddit__">Reddit</h4></a> - <input class="disable-reddit" type="checkbox"/> - </div> - <div class="wikipedia some-block"><a class="title" href="https://wikipedia.com"><img src="../../assets/images/wikipedia-icon.svg"/> - <h4 data-localise="__MSG_wikipedia__">Wikipedia</h4></a> - <input class="disable-wikipedia" type="checkbox"/> - </div> - <div class="medium some-block"><a class="title" href="https://medium.com"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> - <circle cx="500" cy="500" r="500"></circle> - <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> - <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> - </svg> - <h4 data-localise="__MSG_medium__">Medium</h4></a> - <input class="disable-medium" type="checkbox"/> - </div> - <div class="quora some-block"><a class="title" href="https://quora.com"><img src="../../assets/images/quora.png"/> - <h4>Quora</h4></a> - <input class="disable-quora" type="checkbox"/> - </div> - <div class="imdb some-block"><a class="title" href="https://imdb.com"><img src="../../assets/images/imdb.svg"/> - <h4>IMDb</h4></a> - <input class="disable-imdb" type="checkbox"/> - </div> - <div class="reuters some-block"><a class="title" href="https://reuters.com"><img src="../../assets/images/reuters.svg"/> - <h4>Reuters</h4></a> - <input class="disable-reuters" type="checkbox"/> - </div> - <div class="peertube some-block"><a class="title" href="https://search.joinpeertube.org"><img src="../../assets/images/peertube-icon.svg"/> - <h4 data-localise="__MSG_peertube__">PeerTube</h4></a> - <input class="disable-peertube" type="checkbox"/> - </div> - <div class="lbry some-block"><a class="title" href="https://odysee.com/"><img src="../../assets/images/lbry-icon.png"/> - <h4 data-localise="__MSG_lbry__">LBRY</h4></a> - <input class="disable-lbry" type="checkbox"/> - </div> - <div class="search some-block"><a class="title" href="https://search.libredirect.invalid"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> - <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> - </svg> - <h4 data-localise="__MSG_search__">Search</h4></a> - <input class="disable-search" type="checkbox"/> - </div> - <div class="translate some-block"><a class="title" href="https://translate.google.com"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> - </svg> - <h4 data-localise="__MSG_translate__">Translate</h4></a> - <input class="disable-translate" type="checkbox"/> - </div> - <div class="maps some-block"><a class="title" href="https://www.openstreetmap.org"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> - </svg> - <h4 data-localise="__MSG_maps__">Maps</h4></a> - <input class="disable-osm" type="checkbox"/> - </div> - <div class="sendTargets some-block"><a class="title" href="https://send.libredirect.invalid"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> - </svg> - <h4 data-localise="__MSG_sendFiles__">Send Files</h4></a> - <input class="disable-sendTargets" type="checkbox"/> - </div> + <div class="youtube some-block"><a class="title" href="https://youtube.com"> + <img src="../../assets/images/youtube-icon.png"/> + <h4 data-localise="__MSG_youtube__">Youtube</h4></a> + <input class="youtube-enabled" type="checkbox"/> +</div> +<div class="youtubeMusic some-block"><a class="title" href="https://music.youtube.com"> + <img src="../../assets/images/youtubeMusic-icon.png"/> + <h4 data-localise="__MSG_youtubeMusic__">YT Music</h4></a> + <input class="youtubeMusic-enabled" type="checkbox"/> +</div> +<div class="twitter some-block"><a class="title" href="https://twitter.com"> + <img src="../../assets/images/twitter-icon.png"/> + <h4 data-localise="__MSG_twitter__">Twitter</h4></a> + <input class="twitter-enabled" type="checkbox"/> +</div> +<div class="instagram some-block"><a class="title" href="https://instagram.com"> + <img src="../../assets/images/instagram-icon.png"/> + <h4 data-localise="__MSG_instagram__">Instagram</h4></a> + <input class="instagram-enabled" type="checkbox"/> +</div> +<div class="tiktok some-block"><a class="title" href="https://tiktok.com"> + <img src="../../assets/images/tiktok-icon.png"/> + <h4 data-localise="__MSG_tiktok__">TikTok</h4></a> + <input class="tiktok-enabled" type="checkbox"/> +</div> +<div class="reddit some-block"><a class="title" href="https://reddit.com"> + <img src="../../assets/images/reddit-icon.png"/> + <h4 data-localise="__MSG_reddit__">Reddit</h4></a> + <input class="reddit-enabled" type="checkbox"/> +</div> +<div class="imgur some-block"><a class="title" href="https://imgur.com"> + <img src="../../assets/images/imgur-icon.png"/> + <h4 data-localise="__MSG_imgur__">Imgur</h4></a> + <input class="imgur-enabled" type="checkbox"/> +</div> +<div class="wikipedia some-block"><a class="title" href="https://wikipedia.org"> + <img src="../../assets/images/wikipedia-icon.svg"/> + <h4 data-localise="__MSG_wikipedia__">Wikipedia</h4></a> + <input class="wikipedia-enabled" type="checkbox"/> +</div> +<div class="medium some-block"><a class="title" href="https://medium.com"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> + <circle cx="500" cy="500" r="500"></circle> + <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> + <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> +</svg> + + <h4 data-localise="__MSG_medium__">Medium</h4></a> + <input class="medium-enabled" type="checkbox"/> +</div> +<div class="quora some-block"><a class="title" href="https://quora.com"> + <img src="../../assets/images/quora-icon.png"/> + <h4 data-localise="__MSG_quora__">Quora</h4></a> + <input class="quora-enabled" type="checkbox"/> +</div> +<div class="imdb some-block"><a class="title" href="https://imdb.com"> + <img src="../../assets/images/imdb-icon.svg"/> + <h4 data-localise="__MSG_imdb__">IMDb</h4></a> + <input class="imdb-enabled" type="checkbox"/> +</div> +<div class="reuters some-block"><a class="title" href="https://reuters.com"> + <img src="../../assets/images/reuters-icon.svg"/> + <h4 data-localise="__MSG_reuters__">Reuters</h4></a> + <input class="reuters-enabled" type="checkbox"/> +</div> +<div class="peertube some-block"><a class="title" href="https://search.joinpeertube.org"> + <img src="../../assets/images/peertube-icon.svg"/> + <h4 data-localise="__MSG_peertube__">PeerTube</h4></a> + <input class="peertube-enabled" type="checkbox"/> +</div> +<div class="lbry some-block"><a class="title" href="https://odysee.com"> + <img src="../../assets/images/lbry-icon.png"/> + <h4 data-localise="__MSG_lbry__">LBRY</h4></a> + <input class="lbry-enabled" type="checkbox"/> +</div> +<div class="search some-block"><a class="title" href="https://search.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> + <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> +</svg> + + <h4 data-localise="__MSG_search__">Search</h4></a> + <input class="search-enabled" type="checkbox"/> +</div> +<div class="translate some-block"><a class="title" href="https://translate.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> +</svg> + + <h4 data-localise="__MSG_translate__">Translate</h4></a> + <input class="translate-enabled" type="checkbox"/> +</div> +<div class="maps some-block"><a class="title" href="https://maps.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> +</svg> + + <h4 data-localise="__MSG_maps__">Maps</h4></a> + <input class="maps-enabled" type="checkbox"/> +</div> +<div class="sendFiles some-block"><a class="title" href="https://send.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> +</svg> + + <h4 data-localise="__MSG_sendFiles__">Send Files</h4></a> + <input class="sendFiles-enabled" type="checkbox"/> +</div> + <div id="current_site_divider"> <hr> </div> </div> <div class="all_sites"> - <div class="youtube some-block"><a class="title" href="https://youtube.com"><img src="../../assets/images/youtube-icon.png"/> - <h4 data-localise="__MSG_youtube__">YouTube</h4></a> - <input class="disable-youtube" type="checkbox"/> - </div> - <div class="youtubeMusic some-block"><a class="title" href="https://music.youtube.com"><img src="../../assets/images/youtube-music-icon.png"/> - <h4 data-localise="__MSG_ytmusic__">YT Music</h4></a> - <input class="disable-youtubeMusic" type="checkbox"/> - </div> - <div class="twitter some-block"><a class="title" href="https://twitter.com"><img src="../../assets/images/twitter-icon.png"/> - <h4 data-localise="__MSG_twitter__">Twitter</h4></a> - <input class="disable-nitter" type="checkbox"/> - </div> - <div class="instagram some-block"><a class="title" href="https://instagram.com"><img src="../../assets/images/instagram-icon.png"/> - <h4 data-localise="__MSG_instagram__">Instagram</h4></a> - <input class="disable-bibliogram" type="checkbox"/> - </div> - <div class="tiktok some-block"><a class="title" href="https://tiktok.com"><img src="../../assets/images/tiktok-icon.png"/> - <h4 data-localise="__MSG_tiktok__">TikTok</h4></a> - <input class="disable-tiktok" type="checkbox"/> - </div> - <div class="imgur some-block"><a class="title" href="https://imgur.com"><img src="../../assets/images/imgur.png"/> - <h4 data-localise="__MSG_imgur__">Imgur</h4></a> - <input class="disable-imgur" type="checkbox"/> - </div> - <div class="reddit some-block"><a class="title" href="https://reddit.com"><img src="../../assets/images/reddit-icon.png"/> - <h4 data-localise="__MSG_reddit__">Reddit</h4></a> - <input class="disable-reddit" type="checkbox"/> - </div> - <div class="wikipedia some-block"><a class="title" href="https://wikipedia.com"><img src="../../assets/images/wikipedia-icon.svg"/> - <h4 data-localise="__MSG_wikipedia__">Wikipedia</h4></a> - <input class="disable-wikipedia" type="checkbox"/> - </div> - <div class="medium some-block"><a class="title" href="https://medium.com"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> - <circle cx="500" cy="500" r="500"></circle> - <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> - <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> - </svg> - <h4 data-localise="__MSG_medium__">Medium</h4></a> - <input class="disable-medium" type="checkbox"/> - </div> - <div class="quora some-block"><a class="title" href="https://quora.com"><img src="../../assets/images/quora.png"/> - <h4>Quora</h4></a> - <input class="disable-quora" type="checkbox"/> - </div> - <div class="imdb some-block"><a class="title" href="https://imdb.com"><img src="../../assets/images/imdb.svg"/> - <h4>IMDb</h4></a> - <input class="disable-imdb" type="checkbox"/> - </div> - <div class="reuters some-block"><a class="title" href="https://reuters.com"><img src="../../assets/images/reuters.svg"/> - <h4>Reuters</h4></a> - <input class="disable-reuters" type="checkbox"/> - </div> - <div class="peertube some-block"><a class="title" href="https://search.joinpeertube.org"><img src="../../assets/images/peertube-icon.svg"/> - <h4 data-localise="__MSG_peertube__">PeerTube</h4></a> - <input class="disable-peertube" type="checkbox"/> - </div> - <div class="lbry some-block"><a class="title" href="https://odysee.com/"><img src="../../assets/images/lbry-icon.png"/> - <h4 data-localise="__MSG_lbry__">LBRY</h4></a> - <input class="disable-lbry" type="checkbox"/> - </div> - <div class="search some-block"><a class="title" href="https://search.libredirect.invalid"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> - <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> - </svg> - <h4 data-localise="__MSG_search__">Search</h4></a> - <input class="disable-search" type="checkbox"/> - </div> - <div class="translate some-block"><a class="title" href="https://translate.google.com"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> - </svg> - <h4 data-localise="__MSG_translate__">Translate</h4></a> - <input class="disable-translate" type="checkbox"/> - </div> - <div class="maps some-block"><a class="title" href="https://www.openstreetmap.org"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> - </svg> - <h4 data-localise="__MSG_maps__">Maps</h4></a> - <input class="disable-osm" type="checkbox"/> - </div> - <div class="sendTargets some-block"><a class="title" href="https://send.libredirect.invalid"> - <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> - <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> - </svg> - <h4 data-localise="__MSG_sendFiles__">Send Files</h4></a> - <input class="disable-sendTargets" type="checkbox"/> - </div> + <div class="youtube some-block"><a class="title" href="https://youtube.com"> + <img src="../../assets/images/youtube-icon.png"/> + <h4 data-localise="__MSG_youtube__">Youtube</h4></a> + <input class="youtube-enabled" type="checkbox"/> +</div> +<div class="youtubeMusic some-block"><a class="title" href="https://music.youtube.com"> + <img src="../../assets/images/youtubeMusic-icon.png"/> + <h4 data-localise="__MSG_youtubeMusic__">YT Music</h4></a> + <input class="youtubeMusic-enabled" type="checkbox"/> +</div> +<div class="twitter some-block"><a class="title" href="https://twitter.com"> + <img src="../../assets/images/twitter-icon.png"/> + <h4 data-localise="__MSG_twitter__">Twitter</h4></a> + <input class="twitter-enabled" type="checkbox"/> +</div> +<div class="instagram some-block"><a class="title" href="https://instagram.com"> + <img src="../../assets/images/instagram-icon.png"/> + <h4 data-localise="__MSG_instagram__">Instagram</h4></a> + <input class="instagram-enabled" type="checkbox"/> +</div> +<div class="tiktok some-block"><a class="title" href="https://tiktok.com"> + <img src="../../assets/images/tiktok-icon.png"/> + <h4 data-localise="__MSG_tiktok__">TikTok</h4></a> + <input class="tiktok-enabled" type="checkbox"/> +</div> +<div class="reddit some-block"><a class="title" href="https://reddit.com"> + <img src="../../assets/images/reddit-icon.png"/> + <h4 data-localise="__MSG_reddit__">Reddit</h4></a> + <input class="reddit-enabled" type="checkbox"/> +</div> +<div class="imgur some-block"><a class="title" href="https://imgur.com"> + <img src="../../assets/images/imgur-icon.png"/> + <h4 data-localise="__MSG_imgur__">Imgur</h4></a> + <input class="imgur-enabled" type="checkbox"/> +</div> +<div class="wikipedia some-block"><a class="title" href="https://wikipedia.org"> + <img src="../../assets/images/wikipedia-icon.svg"/> + <h4 data-localise="__MSG_wikipedia__">Wikipedia</h4></a> + <input class="wikipedia-enabled" type="checkbox"/> +</div> +<div class="medium some-block"><a class="title" href="https://medium.com"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> + <circle cx="500" cy="500" r="500"></circle> + <ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse> + <ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse> +</svg> + + <h4 data-localise="__MSG_medium__">Medium</h4></a> + <input class="medium-enabled" type="checkbox"/> +</div> +<div class="quora some-block"><a class="title" href="https://quora.com"> + <img src="../../assets/images/quora-icon.png"/> + <h4 data-localise="__MSG_quora__">Quora</h4></a> + <input class="quora-enabled" type="checkbox"/> +</div> +<div class="imdb some-block"><a class="title" href="https://imdb.com"> + <img src="../../assets/images/imdb-icon.svg"/> + <h4 data-localise="__MSG_imdb__">IMDb</h4></a> + <input class="imdb-enabled" type="checkbox"/> +</div> +<div class="reuters some-block"><a class="title" href="https://reuters.com"> + <img src="../../assets/images/reuters-icon.svg"/> + <h4 data-localise="__MSG_reuters__">Reuters</h4></a> + <input class="reuters-enabled" type="checkbox"/> +</div> +<div class="peertube some-block"><a class="title" href="https://search.joinpeertube.org"> + <img src="../../assets/images/peertube-icon.svg"/> + <h4 data-localise="__MSG_peertube__">PeerTube</h4></a> + <input class="peertube-enabled" type="checkbox"/> +</div> +<div class="lbry some-block"><a class="title" href="https://odysee.com"> + <img src="../../assets/images/lbry-icon.png"/> + <h4 data-localise="__MSG_lbry__">LBRY</h4></a> + <input class="lbry-enabled" type="checkbox"/> +</div> +<div class="search some-block"><a class="title" href="https://search.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> + <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> +</svg> + + <h4 data-localise="__MSG_search__">Search</h4></a> + <input class="search-enabled" type="checkbox"/> +</div> +<div class="translate some-block"><a class="title" href="https://translate.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path> +</svg> + + <h4 data-localise="__MSG_translate__">Translate</h4></a> + <input class="translate-enabled" type="checkbox"/> +</div> +<div class="maps some-block"><a class="title" href="https://maps.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"></path> +</svg> + + <h4 data-localise="__MSG_maps__">Maps</h4></a> + <input class="maps-enabled" type="checkbox"/> +</div> +<div class="sendFiles some-block"><a class="title" href="https://send.libredirect.invalid"> + <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> + <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path> +</svg> + + <h4 data-localise="__MSG_sendFiles__">Send Files</h4></a> + <input class="sendFiles-enabled" type="checkbox"/> +</div> + </div> <hr> <div class="some-block" id="change_instance_div"><a class="title button prevent" id="change_instance"> @@ -203,7 +241,7 @@ <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"></path> </svg></a></div> - <div class="some-block" id="unify_div" title="Unify cookies across all selected instances"><a class="title button prevent" id="unify"> + <div class="some-block" id="unify_div" title="Unify preferences across all selected instances"><a class="title button prevent" id="unify"> <h4 data-localise="__MSG_unifySettings__">Unify Settings</h4> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> <path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path> @@ -222,4 +260,4 @@ <script type="module" src="../options/init.js"></script> <script type="module" src="./popup.js"></script> </body> -</html> \ No newline at end of file +</html> diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js index 465080c5..ed1546c7 100644 --- a/src/pages/popup/popup.js +++ b/src/pages/popup/popup.js @@ -2,41 +2,24 @@ window.browser = window.browser || window.chrome import utils from "../../assets/javascripts/utils.js" -import generalHelper from "../../assets/javascripts/general.js" - -import youtubeHelper from "../../assets/javascripts/youtube/youtube.js" -import youtubeMusicHelper from "../../assets/javascripts/youtubeMusic.js" -import twitterHelper from "../../assets/javascripts/twitter.js" -import instagramHelper from "../../assets/javascripts/instagram.js" -import redditHelper from "../../assets/javascripts/reddit.js" -import searchHelper from "../../assets/javascripts/search.js" -import translateHelper from "../../assets/javascripts/translate/translate.js" -import mapsHelper from "../../assets/javascripts/maps.js" -import wikipediaHelper from "../../assets/javascripts/wikipedia.js" -import mediumHelper from "../../assets/javascripts/medium.js" -import quoraHelper from "../../assets/javascripts/quora.js" -import libremdbHelper from "../../assets/javascripts/imdb.js" -import reutersHelper from "../../assets/javascripts/reuters.js" -import imgurHelper from "../../assets/javascripts/imgur.js" -import tiktokHelper from "../../assets/javascripts/tiktok.js" -import sendTargetsHelper from "../../assets/javascripts/sendTargets.js" -import peertubeHelper from "../../assets/javascripts/peertube.js" -import lbryHelper from "../../assets/javascripts/lbry.js" - -utils.unify(true).then(r => { - if (!r) document.getElementById("unify_div").style.display = "none" - else { - const unify = document.getElementById("unify") - const textElement = document.getElementById("unify").getElementsByTagName("h4")[0] - unify.addEventListener("click", () => { - const oldHtml = textElement.innerHTML - textElement.innerHTML = "..." - browser.runtime.sendMessage({ function: "unify" }, response => { - if (response && response.response) textElement.innerHTML = oldHtml +// import generalHelper from "../../assets/javascripts/general.js" +import serviceHelper from "../../assets/javascripts/services.js" + +let config, + divs = {} + +async function getConfig() { + return new Promise(resolve => { + fetch("/config/config.json") + .then(response => response.text()) + .then(data => { + config = JSON.parse(data) + resolve() }) - }) - } -}) + }) +} + +await getConfig() utils.switchInstance(true).then(r => { if (!r) document.getElementById("change_instance_div").style.display = "none" @@ -55,386 +38,92 @@ document.getElementById("more-options").addEventListener("click", () => browser. const allSites = document.getElementsByClassName("all_sites")[0] const currSite = document.getElementsByClassName("current_site")[0] -const disableTwitterCurrentSite = currSite.getElementsByClassName("disable-nitter")[0] -const disableTwitterAllSites = allSites.getElementsByClassName("disable-nitter")[0] - -const disableYoutubeCurrentSite = currSite.getElementsByClassName("disable-youtube")[0] -const disableYoutubeAllSites = allSites.getElementsByClassName("disable-youtube")[0] - -const disableYoutubeMusicCurrentSite = currSite.getElementsByClassName("disable-youtubeMusic")[0] -const disableYoutubeMusicAllSites = allSites.getElementsByClassName("disable-youtubeMusic")[0] - -const disableInstagramCurrentSite = currSite.getElementsByClassName("disable-bibliogram")[0] -const disableInstagramAllSites = allSites.getElementsByClassName("disable-bibliogram")[0] - -const disableMapsCurrentSite = currSite.getElementsByClassName("disable-osm")[0] -const disableMapsAllSites = allSites.getElementsByClassName("disable-osm")[0] - -const disableRedditCurrentSite = currSite.getElementsByClassName("disable-reddit")[0] -const disableRedditAllSites = allSites.getElementsByClassName("disable-reddit")[0] - -const disableSearchCurrentSite = currSite.getElementsByClassName("disable-search")[0] -const disableSearchAllSites = allSites.getElementsByClassName("disable-search")[0] - -const disableTranslateCurrentSite = currSite.getElementsByClassName("disable-translate")[0] -const disableTranslateAllSites = allSites.getElementsByClassName("disable-translate")[0] - -const disableWikipediaCurrentSite = currSite.getElementsByClassName("disable-wikipedia")[0] -const disableWikipediaAllSites = allSites.getElementsByClassName("disable-wikipedia")[0] - -const disableMediumCurrentSite = currSite.getElementsByClassName("disable-medium")[0] -const disableMediumAllSites = allSites.getElementsByClassName("disable-medium")[0] - -const disableQuoraCurrentSite = currSite.getElementsByClassName("disable-quora")[0] -const disableQuoraAllSites = allSites.getElementsByClassName("disable-quora")[0] - -const disableImdbCurrentSite = currSite.getElementsByClassName("disable-imdb")[0] -const disableImdbAllSites = allSites.getElementsByClassName("disable-imdb")[0] - -const disableReutersCurrentSite = currSite.getElementsByClassName("disable-reuters")[0] -const disableReutersAllSites = allSites.getElementsByClassName("disable-reuters")[0] - -const disablePeertubeTargetsCurrentSite = currSite.getElementsByClassName("disable-peertube")[0] -const disablePeertubeTargetsAllSites = allSites.getElementsByClassName("disable-peertube")[0] - -const disableLbryTargetsCurrentSite = currSite.getElementsByClassName("disable-lbry")[0] -const disableLbryTargetsAllSites = allSites.getElementsByClassName("disable-lbry")[0] - -const disableSendTargetsCurrentSite = currSite.getElementsByClassName("disable-sendTargets")[0] -const disableSendTargetsAllSites = allSites.getElementsByClassName("disable-sendTargets")[0] - -const disableImgurCurrentSite = currSite.getElementsByClassName("disable-imgur")[0] -const disableImgurAllSites = allSites.getElementsByClassName("disable-imgur")[0] +function setDivs() { + return new Promise(resolve => { + for (const service in config.services) { + divs[service] = {} + divs[service].toggle = {} + divs[service].current = currSite.getElementsByClassName(service)[0] + divs[service].all = allSites.getElementsByClassName(service)[0] + divs[service].toggle.current = currSite.getElementsByClassName(service + "-enabled")[0] + divs[service].toggle.all = allSites.getElementsByClassName(service + "-enabled")[0] + } + resolve() + }) +} -const disableTiktokCurrentSite = currSite.getElementsByClassName("disable-tiktok")[0] -const disableTiktokAllSites = allSites.getElementsByClassName("disable-tiktok")[0] +await setDivs() const currentSiteIsFrontend = document.getElementById("current_site_divider") -browser.storage.local.get( - [ - "disableTwitter", - "disableYoutube", - "disableYoutubeMusic", - "disableInstagram", - "disableMaps", - "disableReddit", - "disableSearch", - "translateDisable", - "disableWikipedia", - "disableImgur", - "disableTiktok", - "disableMedium", - "disableQuora", - "disableImdb", - "disableReuters", - "disablePeertubeTargets", - "disableLbryTargets", - "disableSendTarget", - "popupFrontends", - ], - r => { - disableTwitterCurrentSite.checked = !r.disableTwitter - disableTwitterAllSites.checked = !r.disableTwitter - disableYoutubeCurrentSite.checked = !r.disableYoutube - disableYoutubeAllSites.checked = !r.disableYoutube - disableYoutubeMusicCurrentSite.checked = !r.disableYoutubeMusic - disableYoutubeMusicAllSites.checked = !r.disableYoutubeMusic - disableInstagramCurrentSite.checked = !r.disableInstagram - disableInstagramAllSites.checked = !r.disableInstagram - disableMapsCurrentSite.checked = !r.disableMaps - disableMapsAllSites.checked = !r.disableMaps - disableRedditCurrentSite.checked = !r.disableReddit - disableRedditAllSites.checked = !r.disableReddit - disableSearchCurrentSite.checked = !r.disableSearch - disableSearchAllSites.checked = !r.disableSearch - disableTranslateCurrentSite.checked = !r.translateDisable - disableTranslateAllSites.checked = !r.translateDisable - disableWikipediaCurrentSite.checked = !r.disableWikipedia - disableWikipediaAllSites.checked = !r.disableWikipedia - disableImgurCurrentSite.checked = !r.disableImgur - disableImgurAllSites.checked = !r.disableImgur - disableTiktokCurrentSite.checked = !r.disableTiktok - disableTiktokAllSites.checked = !r.disableTiktok - disableMediumCurrentSite.checked = !r.disableMedium - disableMediumAllSites.checked = !r.disableMedium - disableQuoraCurrentSite.checked = !r.disableQuora - disableQuoraAllSites.checked = !r.disableQuora - disableImdbCurrentSite.checked = !r.disableImdb - disableImdbAllSites.checked = !r.disableImdb - disableReutersCurrentSite.checked = !r.disableReuters - disableReutersAllSites.checked = !r.disableReuters - disablePeertubeTargetsCurrentSite.checked = !r.disablePeertubeTargets - disablePeertubeTargetsAllSites.checked = !r.disablePeertubeTargets - disableLbryTargetsCurrentSite.checked = !r.disableLbryTargets - disableLbryTargetsAllSites.checked = !r.disableLbryTargets - disableSendTargetsCurrentSite.checked = !r.disableSendTarget - disableSendTargetsAllSites.checked = !r.disableSendTarget +browser.storage.local.get("options", r => { + browser.tabs.query({ active: true, currentWindow: true }, async tabs => { + for (const service in config.services) { + if (!r.options.popupServices.includes(service)) allSites.getElementsByClassName(service)[0].classList.add("hide") + else allSites.getElementsByClassName(service)[0].classList.remove("hide") + currSite.getElementsByClassName(service)[0].classList.add("hide") + } - browser.tabs.query({ active: true, currentWindow: true }, async tabs => { - for (const frontend of generalHelper.allPopupFrontends) { - if (!r.popupFrontends.includes(frontend)) allSites.getElementsByClassName(frontend)[0].classList.add("hide") - else allSites.getElementsByClassName(frontend)[0].classList.remove("hide") - currSite.getElementsByClassName(frontend)[0].classList.add("hide") - } + for (const service in config.services) { + divs[service].toggle.all.checked = r.options[service].enabled + divs[service].toggle.current.checked = r.options[service].enabled + } - let url - try { - url = new URL(tabs[0].url) - } catch { - currentSiteIsFrontend.classList.add("hide") - return - } + let url + try { + url = new URL(tabs[0].url) + } catch { + currentSiteIsFrontend.classList.add("hide") + document.getElementById("unify_div").style.display = "none" + return + } - if (youtubeMusicHelper.redirect(url, "main_frame", false, true) || (await youtubeMusicHelper.switchInstance(url, true))) { - currSite.getElementsByClassName("youtubeMusic")[0].classList.remove("hide") - allSites.getElementsByClassName("youtubeMusic")[0].classList.add("hide") - } else if (twitterHelper.redirect(url, "main_frame", false, true) || (await twitterHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("twitter")[0].classList.remove("hide") - allSites.getElementsByClassName("twitter")[0].classList.add("hide") - } else if (instagramHelper.redirect(url, "main_frame", false, true) || (await instagramHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("instagram")[0].classList.remove("hide") - allSites.getElementsByClassName("instagram")[0].classList.add("hide") - } else if (mapsHelper.redirect(url, false)) { - currSite.getElementsByClassName("maps")[0].classList.remove("hide") - allSites.getElementsByClassName("maps")[0].classList.add("hide") - } else if (redditHelper.redirect(url, "main_frame", false, true) || (await redditHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("reddit")[0].classList.remove("hide") - allSites.getElementsByClassName("reddit")[0].classList.add("hide") - } else if (mediumHelper.redirect(url, "main_frame", false, true) || (await mediumHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("medium")[0].classList.remove("hide") - allSites.getElementsByClassName("medium")[0].classList.add("hide") - } else if (quoraHelper.redirect(url, "main_frame", false, true) || (await quoraHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("quora")[0].classList.remove("hide") - allSites.getElementsByClassName("quora")[0].classList.add("hide") - } else if (libremdbHelper.redirect(url, "main_frame", false, true) || (await libremdbHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("imdb")[0].classList.remove("hide") - allSites.getElementsByClassName("imdb")[0].classList.add("hide") - } else if (reutersHelper.redirect(url, "main_frame", false, true)) { - currSite.getElementsByClassName("reuters")[0].classList.remove("hide") - allSites.getElementsByClassName("reuters")[0].classList.add("hide") - } else if (imgurHelper.redirect(url, "main_frame", false, true) || (await imgurHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("imgur")[0].classList.remove("hide") - allSites.getElementsByClassName("imgur")[0].classList.add("hide") - } else if (tiktokHelper.redirect(url, "main_frame", false, true) || (await tiktokHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("tiktok")[0].classList.remove("hide") - allSites.getElementsByClassName("tiktok")[0].classList.add("hide") - } else if (sendTargetsHelper.redirect(url, "main_frame", false, true) || (await sendTargetsHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("sendTargets")[0].classList.remove("hide") - allSites.getElementsByClassName("sendTargets")[0].classList.add("hide") - } else if (peertubeHelper.redirect(url, "main_frame", false, true) || (await peertubeHelper.switchInstance(url, true))) { - currSite.getElementsByClassName("peertube")[0].classList.remove("hide") - allSites.getElementsByClassName("peertube")[0].classList.add("hide") - } else if (lbryHelper.redirect(url, "main_frame", false, true) || (await lbryHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("lbry")[0].classList.remove("hide") - allSites.getElementsByClassName("lbry")[0].classList.add("hide") - } else if (translateHelper.redirect(url, true) || (await translateHelper.switchInstance(url, true))) { - currSite.getElementsByClassName("translate")[0].classList.remove("hide") - allSites.getElementsByClassName("translate")[0].classList.add("hide") - } else if (searchHelper.redirect(url, true) || (await searchHelper.switchInstance(url, true))) { - currSite.getElementsByClassName("search")[0].classList.remove("hide") - allSites.getElementsByClassName("search")[0].classList.add("hide") - } else if (wikipediaHelper.redirect(url, true) || (await wikipediaHelper.switchInstance(url, true))) { - currSite.getElementsByClassName("wikipedia")[0].classList.remove("hide") - allSites.getElementsByClassName("wikipedia")[0].classList.add("hide") - } else if (youtubeHelper.redirect(url, "main_frame", false, true) || (await youtubeHelper.switchInstance(url, "main_frame", false, true))) { - currSite.getElementsByClassName("youtube")[0].classList.remove("hide") - allSites.getElementsByClassName("youtube")[0].classList.add("hide") - } else { - currentSiteIsFrontend.classList.add("hide") + let service = await serviceHelper.computeService(url, true) + let frontend + if (service) { + if (service[0]) { + frontend = service[1] + service = service[0] } - }) - } -) - -document.addEventListener("change", () => { - browser.storage.local.get( - [ - "disableTwitter", - "disableYoutube", - "disableYoutubeMusic", - "disableInstagram", - "disableMaps", - "disableReddit", - "disableSearch", - "translateDisable", - "disableWikipedia", - "disableImgur", - "disableTiktok", - "disableMedium", - "disableQuora", - "disableImdb", - "disableReuters", - "disablePeertubeTargets", - "disableLbryTargets", - "disableSendTarget", - ], - r => { - if (!r.disableTwitter != disableTwitterCurrentSite.checked) - browser.storage.local.set({ - disableTwitter: !disableTwitterCurrentSite.checked, - }) - else if (!r.disableTwitter != disableTwitterAllSites.checked) - browser.storage.local.set({ - disableTwitter: !disableTwitterAllSites.checked, - }) - - if (!r.disableYoutube != disableYoutubeCurrentSite.checked) - browser.storage.local.set({ - disableYoutube: !disableYoutubeCurrentSite.checked, - }) - else if (!r.disableYoutube != disableYoutubeAllSites.checked) - browser.storage.local.set({ - disableYoutube: !disableYoutubeAllSites.checked, - }) - - if (!r.disableYoutubeMusic != disableYoutubeMusicCurrentSite.checked) - browser.storage.local.set({ - disableYoutubeMusic: !disableYoutubeMusicCurrentSite.checked, - }) - else if (!r.disableYoutubeMusic != disableYoutubeMusicAllSites.checked) - browser.storage.local.set({ - disableYoutubeMusic: !disableYoutubeMusicAllSites.checked, - }) - - if (!r.disableInstagram != disableInstagramCurrentSite.checked) - browser.storage.local.set({ - disableInstagram: !disableInstagramCurrentSite.checked, - }) - else if (!r.disableInstagram != disableInstagramAllSites.checked) - browser.storage.local.set({ - disableInstagram: !disableInstagramAllSites.checked, - }) - - if (!r.disableMaps != disableMapsCurrentSite.checked) - browser.storage.local.set({ - disableMaps: !disableMapsCurrentSite.checked, - }) - else if (!r.disableMaps != disableMapsAllSites.checked) - browser.storage.local.set({ - disableMaps: !disableMapsAllSites.checked, - }) - - if (!r.disableReddit != disableRedditCurrentSite.checked) - browser.storage.local.set({ - disableReddit: !disableRedditCurrentSite.checked, - }) - else if (!r.disableReddit != disableRedditAllSites.checked) - browser.storage.local.set({ - disableReddit: !disableRedditAllSites.checked, - }) - - if (!r.disableSearch != disableSearchCurrentSite.checked) - browser.storage.local.set({ - disableSearch: !disableSearchCurrentSite.checked, - }) - else if (!r.disableSearch != disableSearchAllSites.checked) - browser.storage.local.set({ - disableSearch: !disableSearchAllSites.checked, - }) - - if (!r.translateDisable != disableTranslateCurrentSite.checked) - browser.storage.local.set({ - translateDisable: !disableTranslateCurrentSite.checked, - }) - else if (!r.translateDisable != disableTranslateAllSites.checked) - browser.storage.local.set({ - translateDisable: !disableTranslateAllSites.checked, - }) - - if (!r.disableWikipedia != disableWikipediaCurrentSite.checked) - browser.storage.local.set({ - disableWikipedia: !disableWikipediaCurrentSite.checked, - }) - else if (!r.disableWikipedia != disableWikipediaAllSites.checked) - browser.storage.local.set({ - disableWikipedia: !disableWikipediaAllSites.checked, - }) - - if (!r.disableImgur != disableImgurCurrentSite.checked) - browser.storage.local.set({ - disableImgur: !disableImgurCurrentSite.checked, - }) - else if (!r.disableImgur != disableImgurAllSites.checked) - browser.storage.local.set({ - disableImgur: !disableImgurAllSites.checked, - }) - - if (!r.disableTiktok != disableTiktokCurrentSite.checked) - browser.storage.local.set({ - disableTiktok: !disableTiktokCurrentSite.checked, - }) - else if (!r.disableTiktok != disableTiktokAllSites.checked) - browser.storage.local.set({ - disableTiktok: !disableTiktokAllSites.checked, - }) - - if (!r.disableMedium != disableMediumCurrentSite.checked) - browser.storage.local.set({ - disableMedium: !disableMediumCurrentSite.checked, - }) - else if (!r.disableMedium != disableMediumAllSites.checked) - browser.storage.local.set({ - disableMedium: !disableMediumAllSites.checked, - }) - - if (!r.disableQuora != disableQuoraCurrentSite.checked) - browser.storage.local.set({ - disableQuora: !disableQuoraCurrentSite.checked, - }) - else if (!r.disableQuora != disableQuoraAllSites.checked) - browser.storage.local.set({ - disableQuora: !disableQuoraAllSites.checked, - }) - - if (!r.disableImdb != disableImdbCurrentSite.checked) - browser.storage.local.set({ - disableImdb: !disableImdbCurrentSite.checked, - }) - else if (!r.disableImdb != disableImdbAllSites.checked) - browser.storage.local.set({ - disableImdb: !disableImdbAllSites.checked, - }) - - if (!r.disableReuters != disableReutersCurrentSite.checked) - browser.storage.local.set({ - disableReuters: !disableReutersCurrentSite.checked, - }) - else if (!r.disableReuters != disableReutersAllSites.checked) - browser.storage.local.set({ - disableReuters: !disableReutersAllSites.checked, - }) - - if (!r.disablePeertubeTargets != disablePeertubeTargetsCurrentSite.checked) - browser.storage.local.set({ - disablePeertubeTargets: !disablePeertubeTargetsCurrentSite.checked, - }) - else if (!r.disablePeertubeTargets != disablePeertubeTargetsAllSites.checked) - browser.storage.local.set({ - disablePeertubeTargets: !disablePeertubeTargetsAllSites.checked, - }) - - if (!r.disableLbryTargets != disableLbryTargetsCurrentSite.checked) - browser.storage.local.set({ - disableLbryTargets: !disableLbryTargetsCurrentSite.checked, - }) - else if (!r.disableLbryTargets != disableLbryTargetsAllSites.checked) - browser.storage.local.set({ - disableLbryTargets: !disableLbryTargetsAllSites.checked, - }) - - if (!r.disableSendTarget != disableSendTargetsCurrentSite.checked) - browser.storage.local.set({ - disableSendTarget: !disableSendTargetsCurrentSite.checked, - }) - else if (!r.disableSendTarget != disableSendTargetsAllSites.checked) - browser.storage.local.set({ - disableSendTarget: !disableSendTargetsAllSites.checked, + divs[service].current.classList.remove("hide") + divs[service].all.classList.add("hide") + if (frontend && config.services[service].frontends[frontend].preferences && !config.services[service].frontends[frontend].preferences.token) { + const unify = document.getElementById("unify") + const textElement = document.getElementById("unify").getElementsByTagName("h4")[0] + unify.addEventListener("click", () => { + const oldHtml = textElement.innerHTML + textElement.innerHTML = "..." + browser.runtime.sendMessage({ function: "unify" }, response => { + if (response && response.response) textElement.innerHTML = oldHtml + }) }) + } else { + document.getElementById("unify_div").style.display = "none" + } + } else { + currentSiteIsFrontend.classList.add("hide") + document.getElementById("unify_div").style.display = "none" } - ) + }) }) +for (const service in config.services) { + divs[service].toggle.all.addEventListener("change", () => { + browser.storage.local.get("options", r => { + let options = r.options + options[service].enabled = divs[service].toggle.all.checked + browser.storage.local.set({ options }) + }) + }) + divs[service].toggle.current.addEventListener("change", () => { + browser.storage.local.get("options", r => { + let options = r.options + options[service].enabled = divs[service].toggle.current.checked + browser.storage.local.set({ options }) + }) + }) +} + for (const a of document.getElementsByTagName("a")) { a.addEventListener("click", e => { if (!a.classList.contains("prevent")) { diff --git a/src/pages/popup/popup.pug b/src/pages/popup/popup.pug deleted file mode 100644 index cc7fc7a2..00000000 --- a/src/pages/popup/popup.pug +++ /dev/null @@ -1,155 +0,0 @@ -include ../widgets/icons.pug - -mixin services - .youtube.some-block - a.title(href="https://youtube.com") - img(src="../../assets/images/youtube-icon.png") - h4(data-localise="__MSG_youtube__") YouTube - input.disable-youtube(type="checkbox") - - .youtubeMusic.some-block - a.title(href="https://music.youtube.com") - img(src="../../assets/images/youtube-music-icon.png") - h4(data-localise="__MSG_ytmusic__") YT Music - input.disable-youtubeMusic(type="checkbox") - - .twitter.some-block - a.title(href="https://twitter.com") - img(src="../../assets/images/twitter-icon.png") - h4(data-localise="__MSG_twitter__") Twitter - input.disable-nitter(type="checkbox") - - .instagram.some-block - a.title(href="https://instagram.com") - img(src="../../assets/images/instagram-icon.png") - h4(data-localise="__MSG_instagram__") Instagram - input.disable-bibliogram(type="checkbox") - - .tiktok.some-block - a.title(href="https://tiktok.com") - img(src="../../assets/images/tiktok-icon.png") - h4(data-localise="__MSG_tiktok__") TikTok - input.disable-tiktok(type="checkbox") - - .imgur.some-block - a.title(href="https://imgur.com") - img(src="../../assets/images/imgur.png") - h4(data-localise="__MSG_imgur__") Imgur - input.disable-imgur(type="checkbox") - - .reddit.some-block - a.title(href="https://reddit.com") - img(src="../../assets/images/reddit-icon.png") - h4(data-localise="__MSG_reddit__") Reddit - input.disable-reddit(type="checkbox") - - .wikipedia.some-block - a.title(href="https://wikipedia.com") - img(src="../../assets/images/wikipedia-icon.svg") - h4(data-localise="__MSG_wikipedia__") Wikipedia - input.disable-wikipedia(type="checkbox") - - .medium.some-block - a.title(href="https://medium.com") - +medium - h4(data-localise="__MSG_medium__") Medium - input.disable-medium(type="checkbox") - - .quora.some-block - a.title(href="https://quora.com") - img(src="../../assets/images/quora.png") - h4() Quora - input.disable-quora(type="checkbox") - - .imdb.some-block - a.title(href="https://imdb.com") - img(src="../../assets/images/imdb.svg") - h4() IMDb - input.disable-imdb(type="checkbox") - - .reuters.some-block - a.title(href="https://reuters.com") - img(src="../../assets/images/reuters.svg") - h4() Reuters - input.disable-reuters(type="checkbox") - - .peertube.some-block - a.title(href="https://search.joinpeertube.org") - img(src="../../assets/images/peertube-icon.svg") - h4(data-localise="__MSG_peertube__") PeerTube - input.disable-peertube(type="checkbox") - - .lbry.some-block - a.title(href="https://odysee.com/") - img(src="../../assets/images/lbry-icon.png") - h4(data-localise="__MSG_lbry__") LBRY - input.disable-lbry(type="checkbox") - - .search.some-block - a.title(href="https://search.libredirect.invalid") - +search - h4(data-localise="__MSG_search__") Search - input.disable-search(type="checkbox") - - .translate.some-block - a.title(href="https://translate.google.com") - +translate - h4(data-localise="__MSG_translate__") Translate - input.disable-translate(type="checkbox") - - .maps.some-block - a.title(href="https://www.openstreetmap.org") - +maps - h4(data-localise="__MSG_maps__") Maps - input.disable-osm(type="checkbox") - - .sendTargets.some-block - a.title(href="https://send.libredirect.invalid") - +send - h4(data-localise="__MSG_sendFiles__") Send Files - input.disable-sendTargets(type="checkbox") - -doctype html -html(lang="en") - head - meta(charset="utf-8") - meta(name="viewport" content="width=device-width, initial-scale=1") - link(href="../stylesheets/styles.css" rel="stylesheet") - link(href="./style.css" rel="stylesheet") - body(dir="auto") - .current_site - +services - #current_site_divider - hr - .all_sites - +services - hr - #change_instance_div.some-block - a#change_instance.title.button.prevent - h4(data-localise="__MSG_switchInstance__") Change Instance - +change_instance - - #copy_raw_div.some-block(title="Copy the original redirected link") - a#copy_raw.title.button.prevent - h4(data-localise="__MSG_copyRaw__") Copy Raw - +copy_raw - - #unify_div.some-block(title="Unify cookies across all selected instances") - a#unify.title.button.prevent - h4(data-localise="__MSG_unifySettings__") Unify Settings - +unify - - .some-block - a#more-options.title.button.prevent - h4(data-localise="__MSG_settings__") Settings - +settings - - .some-block - a#about.title.button(href="/pages/options/index.html#about") - h4(data-localise="__MSG_about__") About - +about - - .space - - script(type="module" src="../options/init.js") - script(type="module" src="./popup.js") diff --git a/src/pages/stylesheets/styles.css b/src/pages/stylesheets/styles.css index 06abab3a..eb599656 100644 --- a/src/pages/stylesheets/styles.css +++ b/src/pages/stylesheets/styles.css @@ -80,11 +80,13 @@ select { margin: 0; max-width: 500px; border-radius: 3px; + cursor: pointer; } input[type="url"], input[type="text"] { width: 400px; + cursor: text; } input:invalid { @@ -141,6 +143,7 @@ input[type="range"] { height: 7px; border-radius: 50px; background: var(--text); + cursor: ew-resize; } input[type="range"]:hover { @@ -464,3 +467,13 @@ div.about > div { div.about h4 { width: auto; } + +select:disabled { + opacity: 0.6; + cursor: not-allowed; +} + +input:disabled { + opacity: 0.6; + cursor: not-allowed; +} diff --git a/src/pages/widgets/head.ejs b/src/pages/widgets/head.ejs new file mode 100644 index 00000000..d9e3802a --- /dev/null +++ b/src/pages/widgets/head.ejs @@ -0,0 +1,8 @@ +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="icon" type="image/x-icon" href="../../../assets/images/libredirect.svg"> + <link href="../stylesheets/styles.css" rel="stylesheet"> + <title>General</title> + <script type="module" src="./init.js"></script> +</head> diff --git a/src/pages/widgets/head.pug b/src/pages/widgets/head.pug deleted file mode 100644 index 53de42d3..00000000 --- a/src/pages/widgets/head.pug +++ /dev/null @@ -1,5 +0,0 @@ -head - meta(charset='utf-8') - meta(name="viewport" content="width=device-width, initial-scale=1") - link(rel="icon" type="image/x-icon" href="../../../assets/images/libredirect.svg") - link(href="../../stylesheets/styles.css" rel="stylesheet") \ No newline at end of file diff --git a/src/pages/widgets/icons.pug b/src/pages/widgets/icons.pug deleted file mode 100644 index cc77ad16..00000000 --- a/src/pages/widgets/icons.pug +++ /dev/null @@ -1,46 +0,0 @@ -mixin medium - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor") - circle(cx="500" cy="500" r="500") - ellipse(ry="475" rx="250" cy="501" cx="1296") - ellipse(cx="1682" cy="502" rx="88" ry="424") - -mixin search - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor") - path(d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z") - -mixin translate - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z") - -mixin maps - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path( d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z") - -mixin send - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z") - -mixin change_instance - 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") - -mixin settings - 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") - -mixin 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") - -mixin general - 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") - -mixin unify - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z") - -mixin about - svg( xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="currentColor") - path( d="M11 17h2v-6h-2Zm1-8q.425 0 .713-.288Q13 8.425 13 8t-.287-.713Q12.425 7 12 7t-.712.287Q11 7.575 11 8t.288.712Q11.575 9 12 9Zm0 13q-2.075 0-3.9-.788-1.825-.787-3.175-2.137-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175 1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138 1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175-1.35 1.35-3.175 2.137Q14.075 22 12 22Zm0-2q3.35 0 5.675-2.325Q20 15.35 20 12q0-3.35-2.325-5.675Q15.35 4 12 4 8.65 4 6.325 6.325 4 8.65 4 12q0 3a.35 2.325 5.675Q8.65 20 12 20Zm0-8Z") \ No newline at end of file diff --git a/src/pages/widgets/instances.pug b/src/pages/widgets/instances.pug deleted file mode 100644 index 950bd46b..00000000 --- a/src/pages/widgets/instances.pug +++ /dev/null @@ -1,15 +0,0 @@ -mixin instances(myPlaceholder) - .some-block.option-block - h4(data-localise="__MSG_defaultInstances__") Default Instances - - .checklist - hr - .some-block.option-block - h4(data-localise="__MSG_customInstances__") Custom Instances - form.custom-instance-form - .some-block.option-block - input.custom-instance(placeholder=myPlaceholder type="url") - button.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") - .checklist.custom-checklist \ No newline at end of file diff --git a/src/pages/widgets/latency.pug b/src/pages/widgets/latency.pug deleted file mode 100644 index e5bf53b2..00000000 --- a/src/pages/widgets/latency.pug +++ /dev/null @@ -1,14 +0,0 @@ -mixin latency(service) - - var latencyVal - if (service) - - latencyVal = `latency-${service}` - else - - latencyVal = `latency` - - .buttons.buttons-inline - label.button.button-inline(id=`${latencyVal}-label` for=latencyVal) - svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z") - | - x(data-localise="__MSG_testInstancesLatency__") Test Instances Latency - input.button.button-inline(id=latencyVal style="display:none;") \ No newline at end of file diff --git a/src/pages/widgets/links.ejs b/src/pages/widgets/links.ejs new file mode 100644 index 00000000..2373a101 --- /dev/null +++ b/src/pages/widgets/links.ejs @@ -0,0 +1,23 @@ +<section class="links" id="links"> + <div class="title"> + <a href="#general"> + <%- include ('src/assets/images/general-icon.svg') %> + <span data-localise="__MSG_general__">General</span> + </a></div> + <% for (const service in services) { -%> + <div class="title"> + <a href="#<%= service %>"> + <% if (services[service].imageType != "svgMono") { _%> + <img src="../../../assets/images/<%= service %>-icon.<%= services[service].imageType %>"> + <% } else { _%> + <%- include ('src/assets/images/' + service + '-icon.svg') %> + <% } _%> + <span data-localise="__MSG_<%= service %>__"><%= services[service].name %></span> + </a></div> + <% }; -%> + <div class="title"> + <a href="#about"> + <%- include ('src/assets/images/about-icon.svg') %> + <span data-localise="__MSG_about__">About</span> + </a></div> +</section> diff --git a/src/pages/widgets/links.pug b/src/pages/widgets/links.pug deleted file mode 100644 index 37fe9375..00000000 --- a/src/pages/widgets/links.pug +++ /dev/null @@ -1,83 +0,0 @@ -include ./icons.pug - -mixin links(service) - section#links.links - .title - +general - a(href="#general" data-localise="__MSG_general__") General - - .title - img(src="../../../assets/images/youtube-icon.png") - a(href="#youtube" data-localise="__MSG_youtube__") YouTube - - .title - img(src="../../../assets/images/youtube-music-icon.png") - a(href="#youtubeMusic" data-localise="__MSG_ytmusic__") YT Music - - .title - img(src="../../../assets/images/twitter-icon.png") - a(href="#twitter" data-localise="__MSG_twitter__") Twitter - - .title - img(src="../../../assets/images/instagram-icon.png") - a(href="#instagram" data-localise="__MSG_instagram__") Instagram - - .title - img(src="../../../assets/images/tiktok-icon.png") - a(href="#tiktok" data-localise="__MSG_tiktok__") TikTok - - .title - img(src="../../../assets/images/reddit-icon.png") - a(href="#reddit" data-localise="__MSG_reddit__") Reddit - - .title - img(src="../../../assets/images/imgur.png") - a(href="#imgur" data-localise="__MSG_imgur__") Imgur - - .title - img(src="../../../assets/images/wikipedia-icon.svg") - a(href="#wikipedia" data-localise="__MSG_wikipedia__") Wikipedia - - .title - +medium - a(href="#medium" data-localise="__MSG_medium__") Medium - - .title - img(src="../../../assets/images/quora.png") - a(href="#quora" ) Quora - - .title - img(src="../../../assets/images/imdb.svg") - a(href="#imdb") IMDb - - .title - img(src="../../../assets/images/reuters.svg") - a(href="#reuters") Reuters - - .title - img(src="../../../assets/images/peertube-icon.svg") - a(href="#peertube" data-localise="__MSG_peertube__") PeerTube - - .title - img(src="../../../assets/images/lbry-icon.png") - a(href="#lbry" data-localise="__MSG_lbry__") LBRY - - .title - +search - a(href="#search" data-localise="__MSG_search__") Search - - .title - +translate - a(href="#translate" data-localise="__MSG_translate__") Translate - - .title - +maps - a(href="#maps" data-localise="__MSG_maps__") Maps - - .title - +send - a(href="#sendTargets" data-localise="__MSG_sendFiles__") Send Files - - .title - +about - a(href="#about" data-localise="__MSG_about") About diff --git a/src/pages/widgets/switches.ejs b/src/pages/widgets/switches.ejs new file mode 100644 index 00000000..e3ffdae7 --- /dev/null +++ b/src/pages/widgets/switches.ejs @@ -0,0 +1,11 @@ +<% for (const service in services) { -%> +<div class="<%= service %> some-block"><a class="title" href="<%= services[service].url %>"> + <% if (services[service].imageType != "svgMono") { _%> + <img src="../../assets/images/<%= service %>-icon.<%= services[service].imageType %>"/> + <% } else { _%> + <%- include ('src/assets/images/' + service + '-icon.svg') %> + <% } _%> + <h4 data-localise="__MSG_<%= service %>__"><%= services[service].name %></h4></a> + <input class="<%= service %>-enabled" type="checkbox"/> +</div> +<% } %> |