Complete on supporting Unify #234
This commit is contained in:
parent
0d67cbad51
commit
ab44fd04ff
@ -19,7 +19,7 @@ A web extension that redirects YouTube, Twitter, Instagram... requests to altern
|
|||||||
<img src ="./img/3.png" width=350>
|
<img src ="./img/3.png" width=350>
|
||||||
<img src ="./img/4.png" width=350>
|
<img src ="./img/4.png" width=350>
|
||||||
|
|
||||||
Youtube => [Piped](https://github.com/TeamPiped/Piped), [Invidious](https://github.com/iv-org/invidious), [Piped-Material](https://github.com/mmjee/Piped-Material), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Yattee](https://github.com/yattee/yattee)\
|
Youtube => [Invidious](https://github.com/iv-org/invidious), [Piped](https://github.com/TeamPiped/Piped), [Piped-Material](https://github.com/mmjee/Piped-Material), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Yattee](https://github.com/yattee/yattee)\
|
||||||
Youtube Music => [Beatbump](https://github.com/snuffyDev/Beatbump)\
|
Youtube Music => [Beatbump](https://github.com/snuffyDev/Beatbump)\
|
||||||
Twitter => [Nitter](https://github.com/zedeus/nitter)\
|
Twitter => [Nitter](https://github.com/zedeus/nitter)\
|
||||||
Instagram => [Bibliogram](https://sr.ht/~cadence/bibliogram/)\
|
Instagram => [Bibliogram](https://sr.ht/~cadence/bibliogram/)\
|
||||||
|
@ -1 +1 @@
|
|||||||
pug ./src/pages/options/ -P -w
|
pug ./src/pages/options/ ./src/pages/popup/ -P -w
|
@ -219,11 +219,6 @@
|
|||||||
"description": "used in reddit.html"
|
"description": "used in reddit.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassReddit": {
|
|
||||||
"message": "تجاوز \"Open in Reddit\"",
|
|
||||||
"description": "used in reddit.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"searchNote": {
|
"searchNote": {
|
||||||
"message": "ملاحظة: لاستعمال \"البحث\" بكامل إمكانيته، اجعل LibRedirect محرك البحث الافتراضي",
|
"message": "ملاحظة: لاستعمال \"البحث\" بكامل إمكانيته، اجعل LibRedirect محرك البحث الافتراضي",
|
||||||
"description": "used in search.html"
|
"description": "used in search.html"
|
||||||
@ -264,11 +259,6 @@
|
|||||||
"description": "used in translate.html"
|
"description": "used in translate.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassTwitter": {
|
|
||||||
"message": "تجاوز \"Open in Twitter\"",
|
|
||||||
"description": "used in twitter.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"embeddedVids": {
|
"embeddedVids": {
|
||||||
"message": "واجهة الفيديوهات المضمنة",
|
"message": "واجهة الفيديوهات المضمنة",
|
||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
@ -294,11 +284,6 @@
|
|||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassYoutube": {
|
|
||||||
"message": "تجاوز \"Watch on YouTube\"",
|
|
||||||
"description": "used in youtube.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"enableCustom": {
|
"enableCustom": {
|
||||||
"message": "تمكين الإعدادات الخاصة (ستُستخدم ملفات تعريف الارتباط والـlocalStorage)",
|
"message": "تمكين الإعدادات الخاصة (ستُستخدم ملفات تعريف الارتباط والـlocalStorage)",
|
||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
|
@ -219,11 +219,6 @@
|
|||||||
"description": "used in reddit.html"
|
"description": "used in reddit.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassReddit": {
|
|
||||||
"message": "„Öffnen mit Reddit“ umgehen",
|
|
||||||
"description": "used in reddit.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"searchNote": {
|
"searchNote": {
|
||||||
"message": "Hinweis: Um das volle Potenzial der Suchweiterleitung auszunutzen, lege LibRedirect als Standardsuchmaschine fest.",
|
"message": "Hinweis: Um das volle Potenzial der Suchweiterleitung auszunutzen, lege LibRedirect als Standardsuchmaschine fest.",
|
||||||
"description": "used in search.html"
|
"description": "used in search.html"
|
||||||
@ -264,11 +259,6 @@
|
|||||||
"description": "used in translate.html"
|
"description": "used in translate.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassTwitter": {
|
|
||||||
"message": "„Öffnen mit Twitter“ umgehen",
|
|
||||||
"description": "used in twitter.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"invidious": {
|
"invidious": {
|
||||||
"message": "Invidious",
|
"message": "Invidious",
|
||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
@ -299,11 +289,6 @@
|
|||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassYoutube": {
|
|
||||||
"message": "„Auf YouTube ansehen“ umgehen",
|
|
||||||
"description": "used in youtube.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"enableCustom": {
|
"enableCustom": {
|
||||||
"message": "Aktiviere benutzerdefinierte Einstellungen (verwendet Cookies und localStorage)",
|
"message": "Aktiviere benutzerdefinierte Einstellungen (verwendet Cookies und localStorage)",
|
||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
|
@ -219,11 +219,6 @@
|
|||||||
"description": "used in reddit.html"
|
"description": "used in reddit.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassReddit": {
|
|
||||||
"message": "Bypass \"Open in Reddit\"",
|
|
||||||
"description": "used in reddit.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"searchNote": {
|
"searchNote": {
|
||||||
"message": "Note: To use Search to its full potential, make LibRedirect as the Default Search Engine",
|
"message": "Note: To use Search to its full potential, make LibRedirect as the Default Search Engine",
|
||||||
"description": "used in search.html"
|
"description": "used in search.html"
|
||||||
@ -264,11 +259,6 @@
|
|||||||
"description": "used in translate.html"
|
"description": "used in translate.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassTwitter": {
|
|
||||||
"message": "Bypass \"Open in Twitter\"",
|
|
||||||
"description": "used in twitter.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"invidious": {
|
"invidious": {
|
||||||
"message": "Invidious",
|
"message": "Invidious",
|
||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
@ -299,11 +289,6 @@
|
|||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bypassYoutube": {
|
|
||||||
"message": "Bypass \"Watch on YouTube\"",
|
|
||||||
"description": "used in youtube.html"
|
|
||||||
},
|
|
||||||
|
|
||||||
"enableCustom": {
|
"enableCustom": {
|
||||||
"message": "Enable Custom Settings (will use cookies and localStorage)",
|
"message": "Enable Custom Settings (will use cookies and localStorage)",
|
||||||
"description": "used in youtube.html"
|
"description": "used in youtube.html"
|
||||||
|
@ -40,16 +40,13 @@ async function wholeInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function updateInstances() {
|
async function updateInstances() {
|
||||||
const apiEndpoint = 'https://raw.githubusercontent.com/libredirect/libredirect/master/src/instances/data.json';
|
let http = new XMLHttpRequest();
|
||||||
let request = new XMLHttpRequest();
|
http.open('GET', 'https://raw.githubusercontent.com/libredirect/libredirect/master/src/instances/data.json', false);
|
||||||
request.open('GET', apiEndpoint, false);
|
http.send(null);
|
||||||
request.send(null);
|
|
||||||
|
|
||||||
if (request.status === 200) {
|
|
||||||
|
|
||||||
|
if (http.status === 200) {
|
||||||
await wholeInit();
|
await wholeInit();
|
||||||
|
const instances = JSON.parse(http.responseText);
|
||||||
const instances = JSON.parse(request.responseText);
|
|
||||||
|
|
||||||
brwoser.storage.local.get(
|
brwoser.storage.local.get(
|
||||||
[
|
[
|
||||||
@ -98,12 +95,7 @@ function protocolHost(url) {
|
|||||||
return `${url.protocol}//${url.host}`;
|
return `${url.protocol}//${url.host}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function processDefaultCustomInstances(
|
async function processDefaultCustomInstances(target, name, protocol, document) {
|
||||||
target,
|
|
||||||
name,
|
|
||||||
protocol,
|
|
||||||
document,
|
|
||||||
) {
|
|
||||||
function camelCase(str) {
|
function camelCase(str) {
|
||||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||||
}
|
}
|
||||||
@ -117,7 +109,6 @@ async function processDefaultCustomInstances(
|
|||||||
|
|
||||||
await initCloudflareList();
|
await initCloudflareList();
|
||||||
|
|
||||||
|
|
||||||
let nameDefaultRedirects;
|
let nameDefaultRedirects;
|
||||||
|
|
||||||
let redirectsChecks = `${name}${camelCase(protocol)}RedirectsChecks`;
|
let redirectsChecks = `${name}${camelCase(protocol)}RedirectsChecks`;
|
||||||
@ -250,21 +241,39 @@ function isRtl() {
|
|||||||
return ["ar", "iw", "ku", "fa", "ur"].includes(browser.i18n.getUILanguage())
|
return ["ar", "iw", "ku", "fa", "ur"].includes(browser.i18n.getUILanguage())
|
||||||
}
|
}
|
||||||
|
|
||||||
async function ping(href) {
|
function getIp(href) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
let host = new URL(href).hostname;
|
||||||
let http = new XMLHttpRequest();
|
let http = new XMLHttpRequest();
|
||||||
http.open("GET", href + '?_=' + new Date().getTime(), /*async*/true);
|
http.open("GET", `https://dns.google/resolve?name=${host}`, /*async*/true);
|
||||||
|
http.onreadystatechange = () => {
|
||||||
|
if (http.readyState == 4 && http.status == 200) {
|
||||||
|
let r = JSON.parse(http.responseText);
|
||||||
|
resolve(r.Answer[0].data)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
http.ontimeout = () => resolve()
|
||||||
|
http.onerror = () => resolve()
|
||||||
|
try {
|
||||||
|
http.send(null)
|
||||||
|
}
|
||||||
|
catch (exception) {
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function ping(href) {
|
||||||
|
return new Promise(async resolve => {
|
||||||
|
let http = new XMLHttpRequest();
|
||||||
|
http.open("GET", `${href}?_=${new Date().getTime()}`, /*async*/true);
|
||||||
http.timeout = 5000;
|
http.timeout = 5000;
|
||||||
let started = new Date().getTime();
|
let started = new Date().getTime();
|
||||||
http.onreadystatechange = function () {
|
http.onreadystatechange = () => {
|
||||||
if (http.readyState == 2) {
|
if (http.readyState == 2) {
|
||||||
if (http.status == 200) {
|
let ended = new Date().getTime();
|
||||||
let ended = new Date().getTime();
|
http.abort();
|
||||||
let ms = ended - started;
|
resolve(ended - started);
|
||||||
http.abort();
|
|
||||||
resolve(ms);
|
|
||||||
}
|
|
||||||
else resolve()
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
http.ontimeout = () => resolve(5000)
|
http.ontimeout = () => resolve(5000)
|
||||||
@ -283,19 +292,33 @@ async function testLatency(element, instances) {
|
|||||||
for (const href of instances) await ping(href).then(m => {
|
for (const href of instances) await ping(href).then(m => {
|
||||||
if (m) {
|
if (m) {
|
||||||
myList[href] = m;
|
myList[href] = m;
|
||||||
element.innerHTML = `${href}: ${'<span style="color:' + (m <= 1000 ? "green" : m <= 2000 ? "orange" : "red") + ';">' + (m == 5000 ? '5000ms+' : m + 'ms') + '</span>'}`;
|
let color = m <= 1000 ? "green" : m <= 2000 ? "orange" : "red";
|
||||||
console.log(`${href}: ${m}ms`)
|
let text = m == 5000 ? '5000ms+' : m + 'ms';
|
||||||
|
element.innerHTML = `${href}: '<span style="color:${color};">${text}</span>`;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
resolve(myList);
|
resolve(myList);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyCookie(targetUrl, url, name) {
|
function copyCookie(frontend, targetUrl, url, name) {
|
||||||
browser.cookies.get(
|
browser.cookies.get(
|
||||||
{ url: protocolHost(targetUrl), name: name },
|
{ url: protocolHost(targetUrl), name: name },
|
||||||
r => {
|
r => {
|
||||||
if (r) browser.cookies.set({ url: url, name: name, value: r.value })
|
if (r) {
|
||||||
|
browser.cookies.set({ url: url, name: name, value: r.value })
|
||||||
|
browser.storage.local.set({ [`${frontend}_${name}`]: r.value })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCookiesFromStorage(frontend, to, name) {
|
||||||
|
let key = `${frontend}_${name}`;
|
||||||
|
browser.storage.local.get(
|
||||||
|
key,
|
||||||
|
r => {
|
||||||
|
if (r) browser.cookies.set({ url: to, name: name, value: r[key] })
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -307,5 +330,6 @@ export default {
|
|||||||
processDefaultCustomInstances,
|
processDefaultCustomInstances,
|
||||||
isRtl,
|
isRtl,
|
||||||
testLatency,
|
testLatency,
|
||||||
copyCookie
|
copyCookie,
|
||||||
|
getCookiesFromStorage,
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
window.browser = window.browser || window.chrome;
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
let alwaysUsePreferred;
|
|
||||||
const getAlwaysUsePreferred = () => alwaysUsePreferred;
|
|
||||||
function setAlwaysUsePreferred(val) {
|
|
||||||
alwaysUsePreferred = val;
|
|
||||||
browser.storage.local.set({ alwaysUsePreferred })
|
|
||||||
console.log("alwaysUsePreferred: ", alwaysUsePreferred)
|
|
||||||
}
|
|
||||||
|
|
||||||
let theme;
|
let theme;
|
||||||
const getTheme = () => theme;
|
const getTheme = () => theme;
|
||||||
function setTheme(val) {
|
function setTheme(val) {
|
||||||
@ -17,14 +9,6 @@ function setTheme(val) {
|
|||||||
console.log("theme: ", theme)
|
console.log("theme: ", theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
let applyThemeToSites;
|
|
||||||
const getApplyThemeToSites = () => applyThemeToSites;
|
|
||||||
function setApplyThemeToSites(val) {
|
|
||||||
applyThemeToSites = val;
|
|
||||||
browser.storage.local.set({ applyThemeToSites })
|
|
||||||
console.log("applyThemeToSites: ", applyThemeToSites)
|
|
||||||
}
|
|
||||||
|
|
||||||
let exceptions = {
|
let exceptions = {
|
||||||
"url": [],
|
"url": [],
|
||||||
"regex": [],
|
"regex": [],
|
||||||
@ -59,18 +43,14 @@ async function init() {
|
|||||||
resolve => browser.storage.local.get(
|
resolve => browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"exceptions",
|
"exceptions",
|
||||||
"alwaysUsePreferred",
|
|
||||||
"theme",
|
"theme",
|
||||||
"applyThemeToSites",
|
|
||||||
"popupFrontends",
|
"popupFrontends",
|
||||||
"autoRedirect"
|
"autoRedirect"
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
if (r.exceptions) exceptions = r.exceptions;
|
if (r.exceptions) exceptions = r.exceptions;
|
||||||
alwaysUsePreferred = r.alwaysUsePreferred ?? false;
|
|
||||||
|
|
||||||
theme = r.theme ?? "DEFAULT"
|
theme = r.theme ?? "DEFAULT"
|
||||||
applyThemeToSites = r.applyThemeToSites ?? false;
|
|
||||||
|
|
||||||
popupFrontends = r.popupFrontends ?? [
|
popupFrontends = r.popupFrontends ?? [
|
||||||
"youtube",
|
"youtube",
|
||||||
@ -128,12 +108,6 @@ export default {
|
|||||||
getAutoRedirect,
|
getAutoRedirect,
|
||||||
setAutoRedirect,
|
setAutoRedirect,
|
||||||
|
|
||||||
getAlwaysUsePreferred,
|
|
||||||
setAlwaysUsePreferred,
|
|
||||||
|
|
||||||
getApplyThemeToSites,
|
|
||||||
setApplyThemeToSites,
|
|
||||||
|
|
||||||
getPopupFrontends,
|
getPopupFrontends,
|
||||||
setPopupFrontends,
|
setPopupFrontends,
|
||||||
|
|
||||||
|
@ -52,21 +52,8 @@ let
|
|||||||
rimgoI2pCustomRedirects;
|
rimgoI2pCustomRedirects;
|
||||||
|
|
||||||
function redirect(url, type, initiator) {
|
function redirect(url, type, initiator) {
|
||||||
// https://imgur.com/gallery/s4WXQmn
|
|
||||||
// https://imgur.com/a/H8M4rcp
|
|
||||||
// https://imgur.com/gallery/gYiQLWy
|
|
||||||
// https://imgur.com/gallery/cTRwaJU
|
|
||||||
// https://i.imgur.com/CFSQArP.jpeg
|
|
||||||
|
|
||||||
if (disable) return;
|
if (disable) return;
|
||||||
if (url.pathname == "/") false;
|
if (url.pathname == "/") return;
|
||||||
if (
|
|
||||||
initiator &&
|
|
||||||
([...redirects.rimgo.normal, ...rimgoNormalCustomRedirects].includes(initiator.origin) || targets.test(initiator.host))
|
|
||||||
) return;
|
|
||||||
if (!targets.test(url.href)) return;
|
|
||||||
|
|
||||||
|
|
||||||
if (![
|
if (![
|
||||||
"main_frame",
|
"main_frame",
|
||||||
"sub_frame",
|
"sub_frame",
|
||||||
@ -74,10 +61,19 @@ function redirect(url, type, initiator) {
|
|||||||
"other",
|
"other",
|
||||||
"image",
|
"image",
|
||||||
"media",
|
"media",
|
||||||
].includes(type)) return null;
|
].includes(type)) return;
|
||||||
|
if (
|
||||||
if (url.pathname.includes("delete/")) return null;
|
initiator &&
|
||||||
|
([...redirects.rimgo.normal, ...rimgoNormalCustomRedirects].includes(initiator.origin) || targets.test(initiator.host))
|
||||||
|
) return;
|
||||||
|
if (!targets.test(url.href)) return;
|
||||||
|
if (url.pathname.includes("delete/")) return;
|
||||||
|
|
||||||
|
// https://imgur.com/gallery/s4WXQmn
|
||||||
|
// https://imgur.com/a/H8M4rcp
|
||||||
|
// https://imgur.com/gallery/gYiQLWy
|
||||||
|
// https://imgur.com/gallery/cTRwaJU
|
||||||
|
// https://i.imgur.com/CFSQArP.jpeg
|
||||||
let instancesList;
|
let instancesList;
|
||||||
if (protocol == 'normal') instancesList = [...rimgoNormalRedirectsChecks, ...rimgoNormalCustomRedirects];
|
if (protocol == 'normal') instancesList = [...rimgoNormalRedirectsChecks, ...rimgoNormalCustomRedirects];
|
||||||
if (protocol == 'tor') instancesList = [...rimgoTorRedirectsChecks, ...rimgoTorCustomRedirects];
|
if (protocol == 'tor') instancesList = [...rimgoTorRedirectsChecks, ...rimgoTorCustomRedirects];
|
||||||
@ -88,17 +84,29 @@ function redirect(url, type, initiator) {
|
|||||||
return `${randomInstance}${url.pathname}${url.search}`;
|
return `${randomInstance}${url.pathname}${url.search}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function reverse(url) {
|
async function reverse(url) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
browser.storage.local.get(
|
||||||
if (
|
[
|
||||||
![...redirects.rimgo.normal,
|
"imgurRedirects",
|
||||||
...redirects.rimgo.tor,
|
"rimgoNormalCustomRedirects",
|
||||||
...redirects.rimgo.i2p,
|
"rimgoTorCustomRedirects",
|
||||||
...rimgoNormalCustomRedirects,
|
"rimgoI2pCustomRedirects",
|
||||||
...rimgoTorCustomRedirects,
|
],
|
||||||
...rimgoI2pCustomRedirects].includes(protocolHost)
|
r => {
|
||||||
) return;
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
return `https://imgur.com${url.pathname}${url.search}`;
|
if (
|
||||||
|
![
|
||||||
|
...r.imgurRedirects.rimgo.normal,
|
||||||
|
...r.imgurRedirects.rimgo.tor,
|
||||||
|
...r.imgurRedirects.rimgo.i2p,
|
||||||
|
...r.rimgoNormalCustomRedirects,
|
||||||
|
...r.rimgoTorCustomRedirects,
|
||||||
|
...r.rimgoI2pCustomRedirects
|
||||||
|
].includes(protocolHost)
|
||||||
|
) return;
|
||||||
|
return `https://imgur.com${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchInstance(url) {
|
function switchInstance(url) {
|
||||||
|
@ -84,21 +84,33 @@ function redirect(url, type, initiator) {
|
|||||||
return `${randomInstance}/u${url.pathname}${url.search}`; // Likely a user profile, redirect to '/u/...'
|
return `${randomInstance}/u${url.pathname}${url.search}`; // Likely a user profile, redirect to '/u/...'
|
||||||
}
|
}
|
||||||
|
|
||||||
function reverse(url) {
|
async function reverse(url) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
browser.storage.local.get(
|
||||||
if (
|
[
|
||||||
![...redirects.bibliogram.normal,
|
"instagramRedirects",
|
||||||
...redirects.bibliogram.tor,
|
"bibliogramNormalCustomRedirects",
|
||||||
...bibliogramNormalCustomRedirects,
|
"bibliogramTorCustomRedirects",
|
||||||
...bibliogramTorCustomRedirects].includes(protocolHost)
|
],
|
||||||
) return;
|
r => {
|
||||||
if (url.pathname.startsWith('/p'))
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
return `https://instagram.com${url.pathname.replace('/p', '')}${url.search}`;
|
if (
|
||||||
|
![
|
||||||
|
...r.instagramRedirects.bibliogram.normal,
|
||||||
|
...r.instagramRedirects.bibliogram.tor,
|
||||||
|
...r.bibliogramNormalCustomRedirects,
|
||||||
|
...r.bibliogramTorCustomRedirects
|
||||||
|
].includes(protocolHost)
|
||||||
|
) return;
|
||||||
|
|
||||||
if (url.pathname.startsWith('/u'))
|
if (url.pathname.startsWith('/p'))
|
||||||
return `https://instagram.com${url.pathname.replace('/u', '')}${url.search}`;
|
return `https://instagram.com${url.pathname.replace('/p', '')}${url.search}`;
|
||||||
|
|
||||||
return `https://instagram.com${url.pathname}${url.search}`;
|
if (url.pathname.startsWith('/u'))
|
||||||
|
return `https://instagram.com${url.pathname.replace('/u', '')}${url.search}`;
|
||||||
|
|
||||||
|
return `https://instagram.com${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchInstance(url) {
|
function switchInstance(url) {
|
||||||
@ -139,7 +151,6 @@ function isBibliogram(url) {
|
|||||||
|
|
||||||
let instancesCookies;
|
let instancesCookies;
|
||||||
let theme;
|
let theme;
|
||||||
let applyThemeToSites;
|
|
||||||
function initBibliogramCookies(url) {
|
function initBibliogramCookies(url) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
browser.cookies.get(
|
browser.cookies.get(
|
||||||
@ -150,17 +161,15 @@ function initBibliogramCookies(url) {
|
|||||||
let request = new XMLHttpRequest();
|
let request = new XMLHttpRequest();
|
||||||
request.open("POST", `${protocolHost}/settings/return?referrer=%2F`);
|
request.open("POST", `${protocolHost}/settings/return?referrer=%2F`);
|
||||||
|
|
||||||
if (applyThemeToSites) {
|
let themeValue;
|
||||||
let themeValue;
|
if (theme == 'light') themeValue = "classic";
|
||||||
if (theme == 'light') themeValue = "classic";
|
if (theme == 'dark') themeValue = "pussthecat.org-v2"
|
||||||
if (theme == 'dark') themeValue = "pussthecat.org-v2"
|
|
||||||
|
|
||||||
if (themeValue) {
|
if (themeValue) {
|
||||||
let data = `csrf=x&theme=${themeValue}`;
|
let data = `csrf=x&theme=${themeValue}`;
|
||||||
request.send(data);
|
request.send(data);
|
||||||
if (!instancesCookies.includes(protocolHost)) instancesCookies.push(protocolHost);
|
if (!instancesCookies.includes(protocolHost)) instancesCookies.push(protocolHost);
|
||||||
browser.storage.local.set({ instancesCookies })
|
browser.storage.local.set({ instancesCookies })
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -168,25 +177,22 @@ function initBibliogramCookies(url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function initDefaults() {
|
function initDefaults() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(resolve => {
|
||||||
fetch('/instances/data.json').then(response => response.text()).then(async data => {
|
fetch('/instances/data.json').then(response => response.text()).then(data => {
|
||||||
let dataJson = JSON.parse(data);
|
let dataJson = JSON.parse(data);
|
||||||
redirects.bibliogram = dataJson.bibliogram;
|
redirects.bibliogram = dataJson.bibliogram;
|
||||||
browser.storage.local.get('cloudflareList', async r => {
|
browser.storage.local.get('cloudflareList', r => {
|
||||||
bibliogramNormalRedirectsChecks = [...redirects.bibliogram.normal];
|
bibliogramNormalRedirectsChecks = [...redirects.bibliogram.normal];
|
||||||
for (const instance of r.cloudflareList) {
|
for (const instance of r.cloudflareList) {
|
||||||
let i;
|
let i = bibliogramNormalRedirectsChecks.indexOf(instance);
|
||||||
|
|
||||||
i = bibliogramNormalRedirectsChecks.indexOf(instance);
|
|
||||||
if (i > -1) bibliogramNormalRedirectsChecks.splice(i, 1);
|
if (i > -1) bibliogramNormalRedirectsChecks.splice(i, 1);
|
||||||
}
|
}
|
||||||
await browser.storage.local.set({
|
browser.storage.local.set({
|
||||||
disableInstagram: false,
|
disableInstagram: false,
|
||||||
instagramRedirects: redirects,
|
instagramRedirects: redirects,
|
||||||
|
|
||||||
theme: 'DEFAULT',
|
theme: 'DEFAULT',
|
||||||
applyThemeToSites: false,
|
|
||||||
|
|
||||||
instancesCookies: [],
|
instancesCookies: [],
|
||||||
|
|
||||||
@ -212,7 +218,6 @@ async function init() {
|
|||||||
"instagramRedirects",
|
"instagramRedirects",
|
||||||
|
|
||||||
"theme",
|
"theme",
|
||||||
"applyThemeToSites",
|
|
||||||
|
|
||||||
"instancesCookies",
|
"instancesCookies",
|
||||||
|
|
||||||
@ -228,7 +233,6 @@ async function init() {
|
|||||||
if (r.instagramRedirects) redirects = r.instagramRedirects
|
if (r.instagramRedirects) redirects = r.instagramRedirects
|
||||||
|
|
||||||
theme = r.theme;
|
theme = r.theme;
|
||||||
applyThemeToSites = r.applyThemeToSites;
|
|
||||||
|
|
||||||
instancesCookies = r.instancesCookies;
|
instancesCookies = r.instancesCookies;
|
||||||
|
|
||||||
|
@ -118,7 +118,6 @@ async function initDefaults() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
|
@ -35,18 +35,9 @@ let redirects = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getRedirects = () => redirects;
|
const getRedirects = () => redirects;
|
||||||
const getCustomRedirects = function () {
|
|
||||||
return {
|
|
||||||
"scribe": {
|
|
||||||
"normal": [...scribeNormalRedirectsChecks, ...scribeNormalCustomRedirects],
|
|
||||||
"tor": [...scribeTorRedirectsChecks, ...scribeTorCustomRedirects]
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
function setRedirects(val) {
|
function setRedirects(val) {
|
||||||
redirects.scribe = val;
|
redirects.scribe = val;
|
||||||
browser.storage.local.set({ mediumRedirects: redirects })
|
browser.storage.local.set({ mediumRedirects: redirects })
|
||||||
console.log("mediumRedirects: ", val)
|
|
||||||
for (const item of scribeNormalRedirectsChecks) if (!redirects.scribe.normal.includes(item)) {
|
for (const item of scribeNormalRedirectsChecks) if (!redirects.scribe.normal.includes(item)) {
|
||||||
var index = scribeNormalRedirectsChecks.indexOf(item);
|
var index = scribeNormalRedirectsChecks.indexOf(item);
|
||||||
if (index !== -1) scribeNormalRedirectsChecks.splice(index, 1);
|
if (index !== -1) scribeNormalRedirectsChecks.splice(index, 1);
|
||||||
@ -78,12 +69,11 @@ function redirect(url, type, initiator) {
|
|||||||
|
|
||||||
if (disable) return;
|
if (disable) return;
|
||||||
|
|
||||||
if (type != "main_frame" && "sub_frame" && "xmlhttprequest" && "other") return null;
|
if (type != "main_frame" && "sub_frame" && "xmlhttprequest" && "other") return;
|
||||||
|
|
||||||
if (initiator && ([...redirects.scribe.normal, ...scribeNormalCustomRedirects].includes(initiator.origin))) return;
|
if (initiator && ([...redirects.scribe.normal, ...scribeNormalCustomRedirects].includes(initiator.origin))) return;
|
||||||
|
|
||||||
if (!targets.some(rx => rx.test(url.host))) return;
|
if (!targets.some(rx => rx.test(url.host))) return;
|
||||||
console.log('url.pathname', url.pathname);
|
|
||||||
if (/^\/($|@[a-zA-Z.]{0,}(\/|)$)/.test(url.pathname)) return;
|
if (/^\/($|@[a-zA-Z.]{0,}(\/|)$)/.test(url.pathname)) return;
|
||||||
|
|
||||||
let instancesList;
|
let instancesList;
|
||||||
@ -112,7 +102,6 @@ function switchInstance(url) {
|
|||||||
if (protocol == 'normal') instancesList = [...scribeNormalCustomRedirects, ...scribeNormalRedirectsChecks];
|
if (protocol == 'normal') instancesList = [...scribeNormalCustomRedirects, ...scribeNormalRedirectsChecks];
|
||||||
else if (protocol == 'tor') instancesList = [...scribeTorCustomRedirects, ...scribeTorRedirectsChecks];
|
else if (protocol == 'tor') instancesList = [...scribeTorCustomRedirects, ...scribeTorRedirectsChecks];
|
||||||
|
|
||||||
console.log("instancesList", instancesList);
|
|
||||||
let index = instancesList.indexOf(protocolHost);
|
let index = instancesList.indexOf(protocolHost);
|
||||||
if (index > -1) instancesList.splice(index, 1);
|
if (index > -1) instancesList.splice(index, 1);
|
||||||
|
|
||||||
@ -122,17 +111,17 @@ function switchInstance(url) {
|
|||||||
return `${randomInstance}${url.pathname}${url.search}`;
|
return `${randomInstance}${url.pathname}${url.search}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function initDefaults() {
|
function initDefaults() {
|
||||||
fetch('/instances/data.json').then(response => response.text()).then(async data => {
|
fetch('/instances/data.json').then(response => response.text()).then(data => {
|
||||||
let dataJson = JSON.parse(data);
|
let dataJson = JSON.parse(data);
|
||||||
redirects.scribe = dataJson.scribe;
|
redirects.scribe = dataJson.scribe;
|
||||||
browser.storage.local.get('cloudflareList', async r => {
|
browser.storage.local.get('cloudflareList', r => {
|
||||||
scribeNormalRedirectsChecks = [...redirects.scribe.normal];
|
scribeNormalRedirectsChecks = [...redirects.scribe.normal];
|
||||||
for (const instance of r.cloudflareList) {
|
for (const instance of r.cloudflareList) {
|
||||||
let i = scribeNormalRedirectsChecks.indexOf(instance);
|
let i = scribeNormalRedirectsChecks.indexOf(instance);
|
||||||
if (i > -1) scribeNormalRedirectsChecks.splice(i, 1);
|
if (i > -1) scribeNormalRedirectsChecks.splice(i, 1);
|
||||||
}
|
}
|
||||||
await browser.storage.local.set({
|
browser.storage.local.set({
|
||||||
disableMedium: false,
|
disableMedium: false,
|
||||||
mediumRedirects: redirects,
|
mediumRedirects: redirects,
|
||||||
|
|
||||||
@ -162,10 +151,7 @@ async function init() {
|
|||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disable = r.disableMedium;
|
disable = r.disableMedium;
|
||||||
|
|
||||||
protocol = r.mediumProtocol;
|
protocol = r.mediumProtocol;
|
||||||
|
|
||||||
|
|
||||||
redirects = r.mediumRedirects;
|
redirects = r.mediumRedirects;
|
||||||
|
|
||||||
scribeNormalRedirectsChecks = r.scribeNormalRedirectsChecks;
|
scribeNormalRedirectsChecks = r.scribeNormalRedirectsChecks;
|
||||||
@ -181,10 +167,7 @@ async function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
targets,
|
|
||||||
|
|
||||||
getRedirects,
|
getRedirects,
|
||||||
getCustomRedirects,
|
|
||||||
setRedirects,
|
setRedirects,
|
||||||
|
|
||||||
redirect,
|
redirect,
|
||||||
|
@ -73,11 +73,18 @@ function switchInstance(url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function redirect(url, type, initiator) {
|
function redirect(url, type, initiator) {
|
||||||
|
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
|
||||||
|
|
||||||
if (disable) return null;
|
if (disable) return null;
|
||||||
if (initiator && ([...redirects.simpleertube.normal, ...simpleertubeNormalCustomRedirects].includes(initiator.origin) || targets.includes(initiator.host))) return null;
|
if (
|
||||||
|
initiator &&
|
||||||
|
(
|
||||||
|
[
|
||||||
|
...redirects.simpleertube.normal,
|
||||||
|
...simpleertubeNormalCustomRedirects
|
||||||
|
].includes(initiator.origin) ||
|
||||||
|
targets.includes(initiator.host)
|
||||||
|
)
|
||||||
|
) return null;
|
||||||
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
if (!targets.includes(protocolHost)) return null;
|
if (!targets.includes(protocolHost)) return null;
|
||||||
|
|
||||||
if (type != "main_frame") return null;
|
if (type != "main_frame") return null;
|
||||||
@ -104,9 +111,7 @@ async function initDefaults() {
|
|||||||
}
|
}
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
peerTubeTargets: ['https://search.joinpeertube.org', ...dataJson.peertube],
|
peerTubeTargets: ['https://search.joinpeertube.org', ...dataJson.peertube],
|
||||||
|
|
||||||
disablePeertubeTargets: true,
|
disablePeertubeTargets: true,
|
||||||
|
|
||||||
peertubeRedirects: redirects,
|
peertubeRedirects: redirects,
|
||||||
|
|
||||||
simpleertubeNormalRedirectsChecks: simpleertubeNormalRedirectsChecks,
|
simpleertubeNormalRedirectsChecks: simpleertubeNormalRedirectsChecks,
|
||||||
@ -132,14 +137,11 @@ async function init() {
|
|||||||
"simpleertubeTorCustomRedirects",
|
"simpleertubeTorCustomRedirects",
|
||||||
|
|
||||||
"peerTubeTargets",
|
"peerTubeTargets",
|
||||||
|
|
||||||
"peertubeTargetsProtocol"
|
"peertubeTargetsProtocol"
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disable = r.disablePeertubeTargets;
|
disable = r.disablePeertubeTargets;
|
||||||
|
|
||||||
protocol = r.peertubeTargetsProtocol;
|
protocol = r.peertubeTargetsProtocol;
|
||||||
|
|
||||||
targets = r.peerTubeTargets;
|
targets = r.peerTubeTargets;
|
||||||
|
|
||||||
simpleertubeNormalRedirectsChecks = r.simpleertubeNormalRedirectsChecks;
|
simpleertubeNormalRedirectsChecks = r.simpleertubeNormalRedirectsChecks;
|
||||||
@ -152,7 +154,6 @@ async function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
getRedirects,
|
getRedirects,
|
||||||
setRedirects,
|
setRedirects,
|
||||||
|
|
||||||
|
@ -17,18 +17,6 @@ let redirects = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
const getRedirects = () => redirects;
|
const getRedirects = () => redirects;
|
||||||
const getCustomRedirects = function () {
|
|
||||||
return {
|
|
||||||
"libreddit": {
|
|
||||||
"normal": [...libredditNormalRedirectsChecks, ...libredditNormalCustomRedirects],
|
|
||||||
"tor": [...libredditTorRedirectsChecks, ...libredditTorCustomRedirects]
|
|
||||||
},
|
|
||||||
"teddit": {
|
|
||||||
"normal": [...tedditNormalRedirectsChecks, ...tedditNormalCustomRedirects],
|
|
||||||
"tor": [...tedditTorRedirectsChecks, ...tedditTorCustomRedirects]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
function setLibredditRedirects(val) {
|
function setLibredditRedirects(val) {
|
||||||
redirects.libreddit = val;
|
redirects.libreddit = val;
|
||||||
@ -80,63 +68,93 @@ let tedditTorCustomRedirects = [];
|
|||||||
|
|
||||||
const bypassPaths = /\/(gallery\/poll\/rpan\/settings\/topics)/;
|
const bypassPaths = /\/(gallery\/poll\/rpan\/settings\/topics)/;
|
||||||
|
|
||||||
let disableReddit;
|
let
|
||||||
const getDisableReddit = () => disableReddit;
|
disableReddit,
|
||||||
function setDisableReddit(val) {
|
frontend,
|
||||||
disableReddit = val;
|
protocol;
|
||||||
browser.storage.local.set({ disableReddit })
|
|
||||||
}
|
|
||||||
|
|
||||||
let frontend;
|
function initLibredditCookies(from) {
|
||||||
let protocol;
|
return new Promise(resolve => {
|
||||||
let bypassWatchOnReddit;
|
browser.storage.local.get(
|
||||||
|
[
|
||||||
|
"redditProtocol",
|
||||||
|
"libredditNormalRedirectsChecks",
|
||||||
|
"libredditNormalCustomRedirects",
|
||||||
|
"libredditTorRedirectsChecks",
|
||||||
|
"libredditTorCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
|
if (![
|
||||||
|
...r.libredditNormalRedirectsChecks,
|
||||||
|
...r.libredditTorRedirectsChecks,
|
||||||
|
...r.libredditNormalCustomRedirects,
|
||||||
|
...r.libredditTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
|
||||||
function initLibredditCookies(targetUrl) {
|
let checkedInstances;
|
||||||
browser.storage.local.get(
|
if (r.redditProtocol == 'normal') checkedInstances = [...r.libredditNormalRedirectsChecks, ...r.libredditNormalCustomRedirects];
|
||||||
[
|
else if (r.redditProtocol == 'tor') checkedInstances = [...r.libredditTorRedirectsChecks, ...r.libredditTorCustomRedirects];
|
||||||
"redditProtocol",
|
for (const to of checkedInstances) {
|
||||||
"libredditNormalRedirectsChecks",
|
commonHelper.copyCookie('libreddit', from, to, "theme");
|
||||||
"libredditNormalCustomRedirects",
|
commonHelper.copyCookie('libreddit', from, to, "front_page");
|
||||||
"libredditTorRedirectsChecks",
|
commonHelper.copyCookie('libreddit', from, to, "layout");
|
||||||
"libredditTorCustomRedirects",
|
commonHelper.copyCookie('libreddit', from, to, "wide");
|
||||||
],
|
commonHelper.copyCookie('libreddit', from, to, "post_sort");
|
||||||
r => {
|
commonHelper.copyCookie('libreddit', from, to, "comment_sort");
|
||||||
let checkedInstances;
|
commonHelper.copyCookie('libreddit', from, to, "show_nsfw");
|
||||||
if (r.redditProtocol == 'normal') checkedInstances = [...r.libredditNormalRedirectsChecks, ...r.libredditNormalCustomRedirects];
|
commonHelper.copyCookie('libreddit', from, to, "autoplay_videos");
|
||||||
else if (r.redditProtocol == 'tor') checkedInstances = [...r.libredditTorRedirectsChecks, ...r.libredditTorCustomRedirects];
|
commonHelper.copyCookie('libreddit', from, to, "use_hls");
|
||||||
|
commonHelper.copyCookie('libreddit', from, to, "hide_hls_notification");
|
||||||
for (const instance of checkedInstances) {
|
}
|
||||||
commonHelper.copyCookie(targetUrl, instance, "theme");
|
resolve(true);
|
||||||
commonHelper.copyCookie(targetUrl, instance, "front_page");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "layout");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "wide");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "post_sort");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "comment_sort");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "show_nsfw");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "autoplay_videos");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "use_hls");
|
|
||||||
commonHelper.copyCookie(targetUrl, instance, "hide_hls_notification");
|
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function initTedditCookies() {
|
function initTedditCookies(from) {
|
||||||
let checkedInstances = [
|
return new Promise(resolve => {
|
||||||
...tedditNormalRedirectsChecks,
|
browser.storage.local.get(
|
||||||
...tedditNormalCustomRedirects,
|
[
|
||||||
...tedditTorRedirectsChecks,
|
"redditProtocol",
|
||||||
...tedditTorCustomRedirects
|
"tedditNormalRedirectsChecks",
|
||||||
]
|
"tedditNormalCustomRedirects",
|
||||||
for (const instanceUrl of checkedInstances)
|
"tedditTorRedirectsChecks",
|
||||||
browser.cookies.set({
|
"tedditTorCustomRedirects",
|
||||||
url: instanceUrl,
|
],
|
||||||
name: "theme",
|
r => {
|
||||||
value: theme == 'dark' ? 'dark' : 'white'
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
})
|
if (![
|
||||||
}
|
...r.tedditNormalRedirectsChecks,
|
||||||
|
...r.tedditTorRedirectsChecks,
|
||||||
|
...r.tedditNormalCustomRedirects,
|
||||||
|
...r.tedditTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
|
||||||
let alwaysUsePreferred;
|
let checkedInstances;
|
||||||
|
if (r.redditProtocol == 'normal') checkedInstances = [...r.tedditNormalRedirectsChecks, ...r.tedditNormalCustomRedirects]
|
||||||
|
else if (r.redditProtocol == 'tor') checkedInstances = [...r.tedditTorRedirectsChecks, ...r.tedditTorCustomRedirects]
|
||||||
|
for (const to of checkedInstances) {
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'collapse_child_comments')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'domain_instagram')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'domain_twitter')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'domain_youtube')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'flairs')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'highlight_controversial')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'nsfw_enabled')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'post_media_max_height')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'show_upvoted_percentage')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'show_upvotes')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'theme')
|
||||||
|
commonHelper.copyCookie('teddit', from, to, 'videos_muted')
|
||||||
|
}
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function redirect(url, type, initiator) {
|
function redirect(url, type, initiator) {
|
||||||
// https://libreddit.exonip.de/vid/1mq8d0ma3yk81/720.mp4
|
// https://libreddit.exonip.de/vid/1mq8d0ma3yk81/720.mp4
|
||||||
@ -151,47 +169,9 @@ function redirect(url, type, initiator) {
|
|||||||
// https://i.redd.it/bfkhs659tzk81.jpg
|
// https://i.redd.it/bfkhs659tzk81.jpg
|
||||||
|
|
||||||
if (disableReddit) return null;
|
if (disableReddit) return null;
|
||||||
|
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
|
||||||
|
|
||||||
let isTeddit = [
|
|
||||||
...redirects.teddit.normal,
|
|
||||||
...redirects.teddit.tor
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
let isCheckedTeddit = [
|
|
||||||
...tedditNormalRedirectsChecks,
|
|
||||||
...tedditNormalCustomRedirects,
|
|
||||||
...tedditTorRedirectsChecks,
|
|
||||||
...tedditTorCustomRedirects,
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
let isLibreddit = [
|
|
||||||
...redirects.libreddit.normal,
|
|
||||||
...redirects.libreddit.tor
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
let isCheckedLibreddit = [
|
|
||||||
...libredditNormalRedirectsChecks,
|
|
||||||
...libredditNormalCustomRedirects,
|
|
||||||
...libredditTorRedirectsChecks,
|
|
||||||
...libredditTorCustomRedirects,
|
|
||||||
].includes(protocolHost)
|
|
||||||
|
|
||||||
if (
|
|
||||||
alwaysUsePreferred && frontend == 'teddit' &&
|
|
||||||
(isTeddit || isLibreddit) && !isCheckedTeddit
|
|
||||||
) return switchInstance(url);
|
|
||||||
|
|
||||||
if (
|
|
||||||
alwaysUsePreferred && frontend == 'libreddit' &&
|
|
||||||
(isTeddit || isLibreddit) && !isCheckedLibreddit
|
|
||||||
) return switchInstance(url);
|
|
||||||
|
|
||||||
if (!targets.some(rx => rx.test(url.href))) return null;
|
if (!targets.some(rx => rx.test(url.href))) return null;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
bypassWatchOnReddit &&
|
|
||||||
initiator &&
|
initiator &&
|
||||||
[...redirects.libreddit.normal,
|
[...redirects.libreddit.normal,
|
||||||
...redirects.libreddit.tor,
|
...redirects.libreddit.tor,
|
||||||
@ -320,10 +300,7 @@ async function switchInstance(url) {
|
|||||||
...r.tedditNormalCustomRedirects,
|
...r.tedditNormalCustomRedirects,
|
||||||
...r.tedditTorCustomRedirects,
|
...r.tedditTorCustomRedirects,
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!redditList.includes(protocolHost)) return null;
|
if (!redditList.includes(protocolHost)) return null;
|
||||||
|
|
||||||
console.log('redditFrontend', r.redditFrontend)
|
|
||||||
let instancesList;
|
let instancesList;
|
||||||
if (r.redditFrontend == 'libreddit') {
|
if (r.redditFrontend == 'libreddit') {
|
||||||
if (r.redditProtocol == 'normal') instancesList = [...r.libredditNormalRedirectsChecks, ...r.libredditNormalCustomRedirects];
|
if (r.redditProtocol == 'normal') instancesList = [...r.libredditNormalRedirectsChecks, ...r.libredditNormalCustomRedirects];
|
||||||
@ -346,7 +323,6 @@ async function switchInstance(url) {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function initDefaults() {
|
async function initDefaults() {
|
||||||
@ -370,10 +346,6 @@ async function initDefaults() {
|
|||||||
disableReddit: false,
|
disableReddit: false,
|
||||||
redditProtocol: 'normal',
|
redditProtocol: 'normal',
|
||||||
redditFrontend: 'libreddit',
|
redditFrontend: 'libreddit',
|
||||||
|
|
||||||
bypassWatchOnReddit: true,
|
|
||||||
alwaysUsePreferred: false,
|
|
||||||
|
|
||||||
redditRedirects: redirects,
|
redditRedirects: redirects,
|
||||||
|
|
||||||
libredditNormalRedirectsChecks: libredditNormalRedirectsChecks,
|
libredditNormalRedirectsChecks: libredditNormalRedirectsChecks,
|
||||||
@ -387,18 +359,6 @@ async function initDefaults() {
|
|||||||
|
|
||||||
tedditTorRedirectsChecks: [...redirects.teddit.tor],
|
tedditTorRedirectsChecks: [...redirects.teddit.tor],
|
||||||
tedditTorCustomRedirects: [],
|
tedditTorCustomRedirects: [],
|
||||||
|
|
||||||
enableLibredditCustomSettings: false,
|
|
||||||
|
|
||||||
redditTheme: 'system',
|
|
||||||
redditFrontPage: 'default',
|
|
||||||
redditLayout: 'card',
|
|
||||||
redditWide: false,
|
|
||||||
redditPostSort: 'hot',
|
|
||||||
redditCommentSort: 'confidence',
|
|
||||||
redditShowNsfw: false,
|
|
||||||
redditUseHls: false,
|
|
||||||
redditHideHlsNotification: false,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -411,6 +371,7 @@ async function init() {
|
|||||||
"disableReddit",
|
"disableReddit",
|
||||||
"redditFrontend",
|
"redditFrontend",
|
||||||
"redditRedirects",
|
"redditRedirects",
|
||||||
|
"redditProtocol",
|
||||||
|
|
||||||
"libredditNormalRedirectsChecks",
|
"libredditNormalRedirectsChecks",
|
||||||
"libredditNormalCustomRedirects",
|
"libredditNormalCustomRedirects",
|
||||||
@ -421,32 +382,10 @@ async function init() {
|
|||||||
"tedditNormalCustomRedirects",
|
"tedditNormalCustomRedirects",
|
||||||
"tedditTorRedirectsChecks",
|
"tedditTorRedirectsChecks",
|
||||||
"tedditTorCustomRedirects",
|
"tedditTorCustomRedirects",
|
||||||
|
|
||||||
"redditProtocol",
|
|
||||||
"bypassWatchOnReddit",
|
|
||||||
|
|
||||||
"alwaysUsePreferred",
|
|
||||||
|
|
||||||
"enableLibredditCustomSettings",
|
|
||||||
|
|
||||||
"redditTheme",
|
|
||||||
"redditFrontPage",
|
|
||||||
"redditLayout",
|
|
||||||
"redditWide",
|
|
||||||
"redditPostSort",
|
|
||||||
"redditCommentSort",
|
|
||||||
"redditShowNsfw",
|
|
||||||
"redditAutoplayVideos",
|
|
||||||
"redditUseHls",
|
|
||||||
"redditHideHlsNotification",
|
|
||||||
], r => {
|
], r => {
|
||||||
disableReddit = r.disableReddit;
|
disableReddit = r.disableReddit;
|
||||||
protocol = r.redditProtocol;
|
protocol = r.redditProtocol;
|
||||||
frontend = r.redditFrontend;
|
frontend = r.redditFrontend;
|
||||||
|
|
||||||
bypassWatchOnReddit = r.bypassWatchOnReddit;
|
|
||||||
alwaysUsePreferred = r.alwaysUsePreferred;
|
|
||||||
|
|
||||||
redirects = r.redditRedirects;
|
redirects = r.redditRedirects;
|
||||||
|
|
||||||
libredditNormalRedirectsChecks = r.libredditNormalRedirectsChecks;
|
libredditNormalRedirectsChecks = r.libredditNormalRedirectsChecks;
|
||||||
@ -468,15 +407,10 @@ async function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
targets,
|
|
||||||
getRedirects,
|
getRedirects,
|
||||||
getCustomRedirects,
|
|
||||||
setTedditRedirects,
|
setTedditRedirects,
|
||||||
setLibredditRedirects,
|
setLibredditRedirects,
|
||||||
|
|
||||||
getDisableReddit,
|
|
||||||
setDisableReddit,
|
|
||||||
|
|
||||||
initLibredditCookies,
|
initLibredditCookies,
|
||||||
initTedditCookies,
|
initTedditCookies,
|
||||||
|
|
||||||
|
@ -122,138 +122,120 @@ let
|
|||||||
whoogleTorCustomRedirects,
|
whoogleTorCustomRedirects,
|
||||||
whoogleI2pCustomRedirects;
|
whoogleI2pCustomRedirects;
|
||||||
|
|
||||||
let disable; // disableSearch
|
let disable, // disableSearch
|
||||||
let frontend; // searchFrontend
|
frontend, // searchFrontend
|
||||||
let protocol; // searchProtocol
|
protocol; // searchProtocol
|
||||||
|
|
||||||
let theme;
|
function initSearxCookies(from) {
|
||||||
let applyThemeToSites;
|
return new Promise(resolve => {
|
||||||
function initSearxCookies() {
|
browser.storage.local.get(
|
||||||
let themeValue;
|
[
|
||||||
if (theme == 'light') themeValue = 'logicodev';
|
"searchProtocol",
|
||||||
if (theme == 'dark') themeValue = 'logicodev-dark';
|
"searxNormalRedirectsChecks",
|
||||||
if (applyThemeToSites && themeValue) {
|
"searxNormalCustomRedirects",
|
||||||
let checkedInstances;
|
"searxTorRedirectsChecks",
|
||||||
if (protocol == 'normal') checkedInstances = [...searxNormalRedirectsChecks, ...searxNormalCustomRedirects];
|
"searxTorCustomRedirects",
|
||||||
else if (protocol == 'tor') checkedInstances = [...searxTorRedirectsChecks, ...searxTorCustomRedirects];
|
"searxI2pRedirectsChecks",
|
||||||
else if (protocol == 'i2p') checkedInstances = [...searxI2pRedirectsChecks, ...searxI2pCustomRedirects];
|
"searxI2pCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
|
if (![
|
||||||
|
...r.searxNormalRedirectsChecks,
|
||||||
|
...r.searxNormalCustomRedirects,
|
||||||
|
...r.searxTorRedirectsChecks,
|
||||||
|
...r.searxTorCustomRedirects,
|
||||||
|
...r.searxI2pRedirectsChecks,
|
||||||
|
...r.searxI2pCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
|
||||||
for (const instanceUrl of checkedInstances) {
|
let checkedInstances;
|
||||||
browser.cookies.set({ url: instanceUrl, name: "oscar-style", value: themeValue })
|
if (protocol == 'normal') checkedInstances = [...r.searxNormalRedirectsChecks, ...r.searxNormalCustomRedirects];
|
||||||
browser.cookies.set({ url: instanceUrl, name: "theme", value: 'oscar' })
|
else if (protocol == 'tor') checkedInstances = [...r.searxTorRedirectsChecks, ...r.searxTorCustomRedirects];
|
||||||
}
|
else if (protocol == 'i2p') checkedInstances = [...r.searxI2pRedirectsChecks, ...r.searxI2pCustomRedirects];
|
||||||
}
|
for (const to of checkedInstances) {
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'advanced_search');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'autocomplete');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'categories');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'disabled_engines');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'disabled_plugins');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'doi_resolver');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'enabled_engines');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'enabled_plugins');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'image_proxy');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'language');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'locale');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'method');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'oscar-style');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'results_on_new_tab');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'safesearch');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'theme');
|
||||||
|
commonHelper.copyCookie('searx', from, to, 'tokens');
|
||||||
|
}
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function initSearxngCookies() {
|
function initSearxngCookies(from) {
|
||||||
browser.storage.local.get(
|
return new Promise(resolve => {
|
||||||
[
|
browser.storage.local.get(
|
||||||
"searchProtocol",
|
[
|
||||||
"searchFrontend",
|
"searchProtocol",
|
||||||
"searxngCustomSettings",
|
"searxngNormalRedirectsChecks",
|
||||||
|
"searxngNormalCustomRedirects",
|
||||||
|
"searxngTorRedirectsChecks",
|
||||||
|
"searxngTorCustomRedirects",
|
||||||
|
"searxngI2pRedirectsChecks",
|
||||||
|
"searxngI2pCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
|
if (![
|
||||||
|
...r.searxngNormalRedirectsChecks,
|
||||||
|
...r.searxngNormalCustomRedirects,
|
||||||
|
...r.searxngTorRedirectsChecks,
|
||||||
|
...r.searxngTorCustomRedirects,
|
||||||
|
...r.searxngI2pRedirectsChecks,
|
||||||
|
...r.searxngI2pCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
|
||||||
"searxngNormalRedirectsChecks",
|
let checkedInstances;
|
||||||
"searxngNormalCustomRedirects",
|
if (r.searchProtocol == 'normal') checkedInstances = [...r.searxngNormalRedirectsChecks, ...r.searxngNormalCustomRedirects];
|
||||||
"searxngTorRedirectsChecks",
|
else if (r.searchProtocol == 'tor') checkedInstances = [...r.searxngTorRedirectsChecks, ...r.searxngTorCustomRedirects];
|
||||||
"searxngTorCustomRedirects",
|
else if (r.searchProtocol == 'i2p') checkedInstances = [...r.searxngI2pRedirectsChecks, ...r.searxngI2pCustomRedirects];
|
||||||
"searxngI2pRedirectsChecks",
|
for (const to of checkedInstances) {
|
||||||
"searxngI2pCustomRedirects",
|
commonHelper.copyCookie('searxng', from, to, 'autocomplete');
|
||||||
|
commonHelper.copyCookie('searxng', from, to, 'categories');
|
||||||
"searxng_category_general",
|
commonHelper.copyCookie('searxng', from, to, 'disabled_engines');
|
||||||
"searxng_category_images",
|
commonHelper.copyCookie('searxng', from, to, 'disabled_plugins');
|
||||||
"searxng_category_videos",
|
commonHelper.copyCookie('searxng', from, to, 'doi_resolver');
|
||||||
"searxng_category_news",
|
commonHelper.copyCookie('searxng', from, to, 'enabled_plugins');
|
||||||
"searxng_category_map",
|
commonHelper.copyCookie('searxng', from, to, 'enabled_engines');
|
||||||
"searxng_category_music",
|
commonHelper.copyCookie('searxng', from, to, 'image_proxy');
|
||||||
"searxng_category_it",
|
commonHelper.copyCookie('searxng', from, to, 'infinite_scroll');
|
||||||
"searxng_category_science",
|
commonHelper.copyCookie('searxng', from, to, 'language');
|
||||||
"searxng_category_files",
|
commonHelper.copyCookie('searxng', from, to, 'locale');
|
||||||
"searxng_category_social_media",
|
commonHelper.copyCookie('searxng', from, to, 'maintab');
|
||||||
"searxng_language",
|
commonHelper.copyCookie('searxng', from, to, 'method');
|
||||||
"searxng_autocomplete",
|
commonHelper.copyCookie('searxng', from, to, 'query_in_title');
|
||||||
"searxng_safesearch",
|
commonHelper.copyCookie('searxng', from, to, 'results_on_new_tab');
|
||||||
"searxng_hostname_replace",
|
commonHelper.copyCookie('searxng', from, to, 'safesearch');
|
||||||
"searxng_oa_doi_rewrite",
|
commonHelper.copyCookie('searxng', from, to, 'simple_style');
|
||||||
"searxng_doi_resolver",
|
commonHelper.copyCookie('searxng', from, to, 'theme');
|
||||||
"searxng_tokens",
|
commonHelper.copyCookie('searxng', from, to, 'tokens');
|
||||||
"searxng_locale",
|
}
|
||||||
"searxng_theme",
|
resolve(true);
|
||||||
"searxng_simple_style",
|
|
||||||
"searxng_results_on_new_tab",
|
|
||||||
"searxng_infinite_scroll",
|
|
||||||
"searxng_search_on_category_select",
|
|
||||||
"searxng_vim_hotkeys",
|
|
||||||
"searxng_method",
|
|
||||||
"searxng_image_proxy",
|
|
||||||
"searxng_query_in_title",
|
|
||||||
"searxng_tracker_url_remover",
|
|
||||||
],
|
|
||||||
r => {
|
|
||||||
if (!r.searxngCustomSettings || r.searchFrontend != 'searxng') return;
|
|
||||||
console.log('init SearXNG Cookies');
|
|
||||||
let checkedInstances;
|
|
||||||
if (r.searchProtocol == 'normal') checkedInstances = [...r.searxngNormalRedirectsChecks, ...r.searxngNormalCustomRedirects];
|
|
||||||
else if (r.searchProtocol == 'tor') checkedInstances = [...r.searxngTorRedirectsChecks, ...r.searxngTorCustomRedirects];
|
|
||||||
else if (r.searchProtocol == 'i2p') checkedInstances = [...r.searxngI2pRedirectsChecks, ...r.searxngI2pCustomRedirects];
|
|
||||||
|
|
||||||
let categoryList = [];
|
|
||||||
if (r.searxng_category_general) categoryList.push('general')
|
|
||||||
if (r.searxng_category_images) categoryList.push('images')
|
|
||||||
if (r.searxng_category_videos) categoryList.push('videos')
|
|
||||||
if (r.searxng_category_news) categoryList.push('news')
|
|
||||||
if (r.searxng_category_map) categoryList.push('map')
|
|
||||||
if (r.searxng_category_music) categoryList.push('music')
|
|
||||||
if (r.searxng_category_it) categoryList.push('it')
|
|
||||||
if (r.searxng_category_science) categoryList.push('science')
|
|
||||||
if (r.searxng_category_files) categoryList.push('files')
|
|
||||||
if (r.searxng_category_social_media) categoryList.push('social media')
|
|
||||||
let categoryString = '"' + categoryList.join("\\054") + '"' // ""general\054images\054videos""
|
|
||||||
|
|
||||||
let enabledPluginsList = [];
|
|
||||||
if (r.searxng_hostname_replace) enabledPluginsList.push('searx.plugins.hostname_replace')
|
|
||||||
if (r.searxng_oa_doi_rewrite) enabledPluginsList.push('searx.plugins.oa_doi_rewrite')
|
|
||||||
if (r.searxng_vim_hotkeys) enabledPluginsList.push('searx.plugins.vim_hotkeys')
|
|
||||||
|
|
||||||
let enabledPluginsString = '"' + enabledPluginsList.join("\\054") + '"' // ""searx.plugins.hostname_replace\054searx.plugins.oa_doi_rewrite""
|
|
||||||
|
|
||||||
|
|
||||||
let disabledPluginsList = [];
|
|
||||||
if (!r.searxng_search_on_category_select) disabledPluginsList.push('searx.plugins.search_on_category_select')
|
|
||||||
if (!r.searxng_tracker_url_remover) disabledPluginsList.push('searx.plugins.tracker_url_remover')
|
|
||||||
let disabledPluginsString = '"' + disabledPluginsList.join("\\054") + '"' // ""searx.plugins.hostname_replace\054searx.plugins.oa_doi_rewrite""
|
|
||||||
|
|
||||||
for (const instanceUrl of checkedInstances) {
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "categories", value: categoryString });
|
|
||||||
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "language", value: r.searxng_language });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "autocomplete", value: r.searxng_autocomplete });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "safesearch", value: r.searxng_safesearch });
|
|
||||||
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "enabled_plugins", value: enabledPluginsString });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "disabled_plugins", value: disabledPluginsString });
|
|
||||||
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "doi_resolver", value: r.searxng_doi_resolver });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "tokens", value: r.searxng_tokens });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "locale", value: r.searxng_locale });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "theme", value: r.searxng_theme });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "simple_style", value: r.searxng_simple_style });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "results_on_new_tab", value: r.searxng_results_on_new_tab });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "infinite_scroll", value: r.searxng_infinite_scroll });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "method", value: r.searxng_method });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "image_proxy", value: r.searxng_image_proxy });
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "query_in_title", value: r.searxng_query_in_title });
|
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirect(url) {
|
function redirect(url) {
|
||||||
if (disable) return;
|
if (disable) return;
|
||||||
if (!targets.some(rx => rx.test(url.href))) return;
|
if (!targets.some(rx => rx.test(url.href))) return;
|
||||||
if (url.searchParams.has('tbm')) return;
|
if (url.searchParams.has('tbm')) return;
|
||||||
|
|
||||||
if (url.hostname.includes('google') && !url.searchParams.has('q') && url.pathname != '/') return;
|
if (url.hostname.includes('google') && !url.searchParams.has('q') && url.pathname != '/') return;
|
||||||
let randomInstance;
|
let randomInstance;
|
||||||
let path;
|
let path;
|
||||||
@ -353,7 +335,6 @@ function switchInstance(url) {
|
|||||||
else if (protocol == 'i2p') instancesList = [...whoogleI2pRedirectsChecks, ...whoogleI2pCustomRedirects];
|
else if (protocol == 'i2p') instancesList = [...whoogleI2pRedirectsChecks, ...whoogleI2pCustomRedirects];
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("instancesList", instancesList);
|
|
||||||
let index = instancesList.indexOf(protocolHost);
|
let index = instancesList.indexOf(protocolHost);
|
||||||
if (index > -1) instancesList.splice(index, 1);
|
if (index > -1) instancesList.splice(index, 1);
|
||||||
|
|
||||||
@ -391,6 +372,7 @@ async function initDefaults() {
|
|||||||
searchFrontend: 'searxng',
|
searchFrontend: 'searxng',
|
||||||
searchRedirects: redirects,
|
searchRedirects: redirects,
|
||||||
searxngCustomSettings: false,
|
searxngCustomSettings: false,
|
||||||
|
searchProtocol: 'normal',
|
||||||
|
|
||||||
whoogleNormalRedirectsChecks: whoogleNormalRedirectsChecks,
|
whoogleNormalRedirectsChecks: whoogleNormalRedirectsChecks,
|
||||||
whoogleNormalCustomRedirects: [],
|
whoogleNormalCustomRedirects: [],
|
||||||
@ -418,46 +400,6 @@ async function initDefaults() {
|
|||||||
|
|
||||||
searxngI2pRedirectsChecks: [...redirects.searxng.i2p],
|
searxngI2pRedirectsChecks: [...redirects.searxng.i2p],
|
||||||
searxngI2pCustomRedirects: [],
|
searxngI2pCustomRedirects: [],
|
||||||
|
|
||||||
theme: 'DEFAULT',
|
|
||||||
applyThemeToSites: false,
|
|
||||||
|
|
||||||
searchProtocol: 'normal',
|
|
||||||
|
|
||||||
searxng_category_general: true,
|
|
||||||
searxng_category_images: false,
|
|
||||||
searxng_category_videos: false,
|
|
||||||
searxng_category_news: false,
|
|
||||||
searxng_category_map: false,
|
|
||||||
searxng_category_music: false,
|
|
||||||
searxng_category_it: false,
|
|
||||||
searxng_category_science: false,
|
|
||||||
searxng_category_files: false,
|
|
||||||
searxng_category_social_media: false,
|
|
||||||
|
|
||||||
searxng_language: 'en',
|
|
||||||
searxng_autocomplete: 'google',
|
|
||||||
searxng_safesearch: '0',
|
|
||||||
|
|
||||||
searxng_hostname_replace: false,
|
|
||||||
searxng_oa_doi_rewrite: false,
|
|
||||||
|
|
||||||
searxng_doi_resolver: 'oadoi.org',
|
|
||||||
searxng_tokens: '',
|
|
||||||
|
|
||||||
searxng_locale: 'en',
|
|
||||||
searxng_theme: 'simple',
|
|
||||||
searxng_simple_style: 'auto',
|
|
||||||
searxng_results_on_new_tab: '0',
|
|
||||||
searxng_infinite_scroll: '0',
|
|
||||||
|
|
||||||
searxng_search_on_category_select: true,
|
|
||||||
searxng_vim_hotkeys: false,
|
|
||||||
|
|
||||||
searxng_method: 'POST',
|
|
||||||
searxng_image_proxy: '1',
|
|
||||||
searxng_query_in_title: '',
|
|
||||||
searxng_tracker_url_remover: false,
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -469,6 +411,7 @@ async function init() {
|
|||||||
"disableSearch",
|
"disableSearch",
|
||||||
"searchFrontend",
|
"searchFrontend",
|
||||||
"searchRedirects",
|
"searchRedirects",
|
||||||
|
"searchProtocol",
|
||||||
|
|
||||||
"whoogleNormalRedirectsChecks",
|
"whoogleNormalRedirectsChecks",
|
||||||
"whoogleNormalCustomRedirects",
|
"whoogleNormalCustomRedirects",
|
||||||
@ -496,20 +439,11 @@ async function init() {
|
|||||||
|
|
||||||
"searxngI2pRedirectsChecks",
|
"searxngI2pRedirectsChecks",
|
||||||
"searxngI2pCustomRedirects",
|
"searxngI2pCustomRedirects",
|
||||||
|
|
||||||
"theme",
|
|
||||||
"applyThemeToSites",
|
|
||||||
|
|
||||||
"searchProtocol",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disable = r.disableSearch;
|
disable = r.disableSearch;
|
||||||
protocol = r.searchProtocol;
|
protocol = r.searchProtocol;
|
||||||
frontend = r.searchFrontend;
|
frontend = r.searchFrontend;
|
||||||
|
|
||||||
theme = r.theme;
|
|
||||||
applyThemeToSites = r.applyThemeToSites;
|
|
||||||
|
|
||||||
redirects = r.searchRedirects;
|
redirects = r.searchRedirects;
|
||||||
|
|
||||||
whoogleNormalRedirectsChecks = r.whoogleNormalRedirectsChecks;
|
whoogleNormalRedirectsChecks = r.whoogleNormalRedirectsChecks;
|
||||||
@ -543,7 +477,6 @@ async function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
setSearxRedirects,
|
setSearxRedirects,
|
||||||
setSearxngRedirects,
|
setSearxngRedirects,
|
||||||
setWhoogleRedirects,
|
setWhoogleRedirects,
|
||||||
|
@ -72,12 +72,15 @@ function switchInstance(url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function redirect(url, type, initiator) {
|
function redirect(url, type, initiator) {
|
||||||
|
|
||||||
if (disable) return null;
|
if (disable) return null;
|
||||||
if (initiator && ([...redirects.send.normal, ...sendNormalCustomRedirects].includes(initiator.origin) || targets.includes(initiator.host))) return null;
|
|
||||||
if (!targets.some(rx => rx.test(url.href))) return null;
|
|
||||||
|
|
||||||
if (type != "main_frame") return null;
|
if (type != "main_frame") return null;
|
||||||
|
if (initiator && (
|
||||||
|
[...redirects.send.normal,
|
||||||
|
...sendNormalCustomRedirects
|
||||||
|
].includes(initiator.origin) ||
|
||||||
|
targets.includes(initiator.host)
|
||||||
|
)) return null;
|
||||||
|
if (!targets.some(rx => rx.test(url.href))) return null;
|
||||||
|
|
||||||
let instancesList;
|
let instancesList;
|
||||||
if (protocol == 'normal') instancesList = [...sendNormalRedirectsChecks, ...sendNormalCustomRedirects];
|
if (protocol == 'normal') instancesList = [...sendNormalRedirectsChecks, ...sendNormalCustomRedirects];
|
||||||
@ -147,9 +150,9 @@ export default {
|
|||||||
getRedirects,
|
getRedirects,
|
||||||
setRedirects,
|
setRedirects,
|
||||||
|
|
||||||
|
redirect,
|
||||||
switchInstance,
|
switchInstance,
|
||||||
|
|
||||||
redirect,
|
|
||||||
initDefaults,
|
initDefaults,
|
||||||
init,
|
init,
|
||||||
};
|
};
|
||||||
|
@ -40,43 +40,51 @@ let proxiTokTorCustomRedirects = [];
|
|||||||
|
|
||||||
let disable; // disableTiktok
|
let disable; // disableTiktok
|
||||||
let protocol;
|
let protocol;
|
||||||
let enableCustom;
|
|
||||||
|
|
||||||
let theme;
|
function initProxiTokCookies(from) {
|
||||||
let api_legacy;
|
return new Promise(resolve => {
|
||||||
|
browser.storage.local.get(
|
||||||
|
[
|
||||||
|
"tiktokProtocol",
|
||||||
|
"proxiTokNormalRedirectsChecks",
|
||||||
|
"proxiTokNormalCustomRedirects",
|
||||||
|
"proxiTokTorRedirectsChecks",
|
||||||
|
"proxiTokTorCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
|
if (![
|
||||||
|
...r.proxiTokNormalRedirectsChecks,
|
||||||
|
...r.proxiTokNormalCustomRedirects,
|
||||||
|
...r.proxiTokTorRedirectsChecks,
|
||||||
|
...r.proxiTokTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
|
||||||
function initProxiTokCookies() {
|
let checkedInstances;
|
||||||
console.log('initProxiTokCookies')
|
if (r.tiktokProtocol == 'normal') checkedInstances = [...r.proxiTokNormalRedirectsChecks, ...r.proxiTokNormalCustomRedirects]
|
||||||
if (enableCustom) {
|
else if (r.tiktokProtocol == 'tor') checkedInstances = [...r.proxiTokTorRedirectsChecks, ...r.proxiTokTorCustomRedirects]
|
||||||
let checkedInstances;
|
for (const to of checkedInstances) {
|
||||||
if (protocol == 'normal') checkedInstances = [...proxiTokNormalRedirectsChecks, ...proxiTokNormalCustomRedirects]
|
commonHelper.copyCookie('proxitok', from, to, 'theme');
|
||||||
else if (protocol == 'tor') checkedInstances = [...proxiTokTorRedirectsChecks, ...proxiTokTorCustomRedirects]
|
commonHelper.copyCookie('proxitok', from, to, 'api-legacy');
|
||||||
|
}
|
||||||
for (const instance of checkedInstances) {
|
resolve(true);
|
||||||
browser.cookies.set({ url: instance, name: "theme", value: theme })
|
}
|
||||||
browser.cookies.set({ url: instance, name: "api-legacy", value: api_legacy ? 'on' : 'off' })
|
)
|
||||||
}
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirect(url, type, initiator) {
|
function redirect(url, type, initiator) {
|
||||||
if (disable) return;
|
if (disable) return;
|
||||||
if (initiator &&
|
if (type != "main_frame") return null;
|
||||||
(
|
if (initiator && (
|
||||||
[
|
[...redirects.proxiTok.normal, ...proxiTokNormalCustomRedirects].includes(initiator.origin) ||
|
||||||
...redirects.proxiTok.normal,
|
targets.includes(initiator.host)
|
||||||
...proxiTokNormalCustomRedirects
|
)
|
||||||
].includes(initiator.origin) ||
|
|
||||||
targets.includes(initiator.host)
|
|
||||||
)
|
|
||||||
) return;
|
) return;
|
||||||
if (!targets.some(rx => rx.test(url.href))) return;
|
if (!targets.some(rx => rx.test(url.href))) return;
|
||||||
// https://www.tiktok.com/@keysikaspol/video/7061265241887345946
|
// https://www.tiktok.com/@keysikaspol/video/7061265241887345946
|
||||||
// https://www.tiktok.com/@keysikaspol
|
// https://www.tiktok.com/@keysikaspol
|
||||||
|
|
||||||
|
|
||||||
if (type != "main_frame") return null;
|
|
||||||
|
|
||||||
let instancesList;
|
let instancesList;
|
||||||
if (protocol == 'normal') instancesList = [...proxiTokNormalRedirectsChecks, ...proxiTokNormalCustomRedirects];
|
if (protocol == 'normal') instancesList = [...proxiTokNormalRedirectsChecks, ...proxiTokNormalCustomRedirects];
|
||||||
if (protocol == 'tor') instancesList = [...proxiTokTorRedirectsChecks, ...proxiTokTorCustomRedirects];
|
if (protocol == 'tor') instancesList = [...proxiTokTorRedirectsChecks, ...proxiTokTorCustomRedirects];
|
||||||
@ -86,16 +94,27 @@ function redirect(url, type, initiator) {
|
|||||||
return `${randomInstance}${url.pathname}`;
|
return `${randomInstance}${url.pathname}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function reverse(url) {
|
async function reverse(url) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
browser.storage.local.get(
|
||||||
if (
|
[
|
||||||
![...redirects.proxiTok.normal,
|
"tiktokRedirects",
|
||||||
...redirects.proxiTok.tor,
|
"proxiTokNormalCustomRedirects",
|
||||||
...proxiTokNormalCustomRedirects,
|
"proxiTokTorCustomRedirects",
|
||||||
...proxiTokTorCustomRedirects].includes(protocolHost)
|
],
|
||||||
) return;
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
|
if (
|
||||||
|
![
|
||||||
|
...r.tiktokRedirects.proxiTok.normal,
|
||||||
|
...r.tiktokRedirects.proxiTok.tor,
|
||||||
|
...r.proxiTokNormalCustomRedirects,
|
||||||
|
...r.proxiTokTorCustomRedirects
|
||||||
|
].includes(protocolHost)
|
||||||
|
) return;
|
||||||
|
|
||||||
return `https://tiktok.com${url.pathname}${url.search}`;
|
return `https://tiktok.com${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function initDefaults() {
|
async function initDefaults() {
|
||||||
@ -114,12 +133,6 @@ async function initDefaults() {
|
|||||||
|
|
||||||
proxiTokTorRedirectsChecks: [...redirects.proxiTok.tor],
|
proxiTokTorRedirectsChecks: [...redirects.proxiTok.tor],
|
||||||
proxiTokTorCustomRedirects: [],
|
proxiTokTorCustomRedirects: [],
|
||||||
|
|
||||||
enableTiktokCustomSettings: false,
|
|
||||||
|
|
||||||
proxiTokTheme: 'default',
|
|
||||||
proxiTokApiLegacy: 'off',
|
|
||||||
|
|
||||||
});
|
});
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
@ -138,11 +151,6 @@ async function init() {
|
|||||||
|
|
||||||
"proxiTokTorRedirectsChecks",
|
"proxiTokTorRedirectsChecks",
|
||||||
"proxiTokTorCustomRedirects",
|
"proxiTokTorCustomRedirects",
|
||||||
|
|
||||||
"enableTiktokCustomSettings",
|
|
||||||
|
|
||||||
"proxiTokTheme",
|
|
||||||
"proxiTokApiLegacy",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disable = r.disableTiktok;
|
disable = r.disableTiktok;
|
||||||
@ -154,25 +162,19 @@ async function init() {
|
|||||||
|
|
||||||
proxiTokTorRedirectsChecks = r.proxiTokTorRedirectsChecks;
|
proxiTokTorRedirectsChecks = r.proxiTokTorRedirectsChecks;
|
||||||
proxiTokTorCustomRedirects = r.proxiTokTorCustomRedirects;
|
proxiTokTorCustomRedirects = r.proxiTokTorCustomRedirects;
|
||||||
|
|
||||||
enableCustom = r.enableTiktokCustomSettings;
|
|
||||||
|
|
||||||
theme = r.proxiTokTheme;
|
|
||||||
api_legacy = r.proxiTokApiLegacy;
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
getRedirects,
|
getRedirects,
|
||||||
setRedirects,
|
setRedirects,
|
||||||
|
|
||||||
|
redirect,
|
||||||
reverse,
|
reverse,
|
||||||
|
|
||||||
initProxiTokCookies,
|
initProxiTokCookies,
|
||||||
|
|
||||||
redirect,
|
|
||||||
initDefaults,
|
initDefaults,
|
||||||
init,
|
init,
|
||||||
};
|
};
|
||||||
|
@ -3,12 +3,10 @@ window.browser = window.browser || window.chrome;
|
|||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"theme",
|
"theme",
|
||||||
"applyThemeToSites",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
let applyThemeToSites = r.applyThemeToSites;
|
|
||||||
let theme = r.theme;
|
let theme = r.theme;
|
||||||
|
|
||||||
if (applyThemeToSites && theme != "DEFAULT") localStorage.setItem("chakra-ui-color-mode", r.theme);
|
if (theme != "DEFAULT") localStorage.setItem("chakra-ui-color-mode", r.theme);
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -38,11 +38,6 @@ function setSimplyTranslateRedirects(val) {
|
|||||||
browser.storage.local.set({ simplyTranslateTorRedirectsChecks })
|
browser.storage.local.set({ simplyTranslateTorRedirectsChecks })
|
||||||
}
|
}
|
||||||
|
|
||||||
let simplyTranslateNormalRedirectsChecks;
|
|
||||||
let simplyTranslateTorRedirectsChecks;
|
|
||||||
let simplyTranslateNormalCustomRedirects = [];
|
|
||||||
let simplyTranslateTorCustomRedirects = [];
|
|
||||||
|
|
||||||
function setLingvaRedirects(val) {
|
function setLingvaRedirects(val) {
|
||||||
redirects.lingva = val;
|
redirects.lingva = val;
|
||||||
browser.storage.local.set({ translateRedirects: redirects })
|
browser.storage.local.set({ translateRedirects: redirects })
|
||||||
@ -62,24 +57,26 @@ function setLingvaRedirects(val) {
|
|||||||
browser.storage.local.set({ lingvaTorRedirectsChecks })
|
browser.storage.local.set({ lingvaTorRedirectsChecks })
|
||||||
}
|
}
|
||||||
|
|
||||||
let lingvaNormalRedirectsChecks;
|
let
|
||||||
let lingvaTorRedirectsChecks;
|
simplyTranslateNormalRedirectsChecks,
|
||||||
let lingvaNormalCustomRedirects = [];
|
simplyTranslateTorRedirectsChecks,
|
||||||
let lingvaTorCustomRedirects = [];
|
simplyTranslateNormalCustomRedirects,
|
||||||
|
simplyTranslateTorCustomRedirects,
|
||||||
|
lingvaNormalRedirectsChecks,
|
||||||
|
lingvaTorRedirectsChecks,
|
||||||
|
lingvaNormalCustomRedirects,
|
||||||
|
lingvaTorCustomRedirects;
|
||||||
|
|
||||||
|
|
||||||
let
|
let
|
||||||
disable, // translateDisable
|
disable, // translateDisable
|
||||||
frontend, // translateFrontend
|
frontend, // translateFrontend
|
||||||
protocol, // translateProtocol
|
protocol; // translateProtocol
|
||||||
from, // translateFrom
|
|
||||||
to, // translateTo
|
|
||||||
simplyTranslateEngine;
|
|
||||||
|
|
||||||
function isTranslateRedirects(url, type, frontend) {
|
function isTranslateRedirects(url, type, frontend) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
|
|
||||||
if (type !== "main_frame") return false;
|
if (type !== "main_frame") return;
|
||||||
|
|
||||||
if (frontend == 'simplyTranslate')
|
if (frontend == 'simplyTranslate')
|
||||||
return [
|
return [
|
||||||
@ -124,40 +121,33 @@ function redirect(url) {
|
|||||||
if (disable) return;
|
if (disable) return;
|
||||||
if (!targets.some(rx => rx.test(url.href))) return;
|
if (!targets.some(rx => rx.test(url.href))) return;
|
||||||
|
|
||||||
let params_arr = url.search.split('&');
|
|
||||||
params_arr[0] = params_arr[0].substring(1);
|
|
||||||
let myMap = {};
|
|
||||||
for (let i = 0; i < params_arr.length; i++) {
|
|
||||||
let pair = params_arr[i].split('=');
|
|
||||||
myMap[pair[0]] = pair[1];
|
|
||||||
}
|
|
||||||
if (frontend == 'simplyTranslate') {
|
if (frontend == 'simplyTranslate') {
|
||||||
let instancesList;
|
let instancesList;
|
||||||
if (protocol == 'normal') instancesList = [...simplyTranslateNormalRedirectsChecks, ...simplyTranslateNormalCustomRedirects];
|
if (protocol == 'normal') instancesList = [...simplyTranslateNormalRedirectsChecks, ...simplyTranslateNormalCustomRedirects];
|
||||||
if (protocol == 'tor') instancesList = [...simplyTranslateTorRedirectsChecks, ...simplyTranslateTorCustomRedirects];
|
if (protocol == 'tor') instancesList = [...simplyTranslateTorRedirectsChecks, ...simplyTranslateTorCustomRedirects];
|
||||||
if (instancesList.length === 0) return null;
|
if (instancesList.length === 0) return;
|
||||||
let randomInstance = commonHelper.getRandomInstance(instancesList)
|
let randomInstance = commonHelper.getRandomInstance(instancesList)
|
||||||
|
|
||||||
if (myMap.sl && myMap.tl && myMap.text)
|
return `${randomInstance}/${url.search}`;
|
||||||
return `${randomInstance}/${url.search}`;
|
|
||||||
else {
|
|
||||||
if (from != "DEFAULT") url.searchParams.append("sl", from);
|
|
||||||
if (to != "DEFAULT") url.searchParams.append("tl", to);
|
|
||||||
if (simplyTranslateEngine != "DEFAULT") url.searchParams.append("engine", simplyTranslateEngine);
|
|
||||||
return `${randomInstance}/${url.search}`
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (frontend == 'lingva') {
|
else if (frontend == 'lingva') {
|
||||||
|
let params_arr = url.search.split('&');
|
||||||
|
params_arr[0] = params_arr[0].substring(1);
|
||||||
|
let myMap = {};
|
||||||
|
for (let i = 0; i < params_arr.length; i++) {
|
||||||
|
let pair = params_arr[i].split('=');
|
||||||
|
myMap[pair[0]] = pair[1];
|
||||||
|
}
|
||||||
let instancesList;
|
let instancesList;
|
||||||
if (protocol == 'normal') instancesList = [...lingvaNormalRedirectsChecks, ...lingvaNormalCustomRedirects];
|
if (protocol == 'normal') instancesList = [...lingvaNormalRedirectsChecks, ...lingvaNormalCustomRedirects];
|
||||||
if (protocol == 'tor') instancesList = [...lingvaTorRedirectsChecks, ...lingvaTorCustomRedirects];
|
if (protocol == 'tor') instancesList = [...lingvaTorRedirectsChecks, ...lingvaTorCustomRedirects];
|
||||||
if (instancesList.length === 0) return null;
|
if (instancesList.length === 0) return;
|
||||||
let randomInstance = commonHelper.getRandomInstance(instancesList)
|
let randomInstance = commonHelper.getRandomInstance(instancesList)
|
||||||
|
|
||||||
if (myMap.sl && myMap.tl && myMap.text)
|
if (myMap.sl && myMap.tl && myMap.text)
|
||||||
return `${randomInstance}/${myMap.sl}/${myMap.tl}/${myMap.text}`;
|
return `${randomInstance}/${myMap.sl}/${myMap.tl}/${myMap.text}`;
|
||||||
else
|
|
||||||
return randomInstance;
|
return randomInstance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,10 +180,8 @@ function switchInstance(url) {
|
|||||||
else if (protocol == 'tor') instancesList = [...lingvaTorRedirectsChecks, ...lingvaTorCustomRedirects];
|
else if (protocol == 'tor') instancesList = [...lingvaTorRedirectsChecks, ...lingvaTorCustomRedirects];
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("instancesList", instancesList);
|
|
||||||
let index = instancesList.indexOf(protocolHost);
|
let index = instancesList.indexOf(protocolHost);
|
||||||
if (index > -1) instancesList.splice(index, 1);
|
if (index > -1) instancesList.splice(index, 1);
|
||||||
|
|
||||||
if (instancesList.length === 0) return null;
|
if (instancesList.length === 0) return null;
|
||||||
|
|
||||||
let randomInstance = commonHelper.getRandomInstance(instancesList);
|
let randomInstance = commonHelper.getRandomInstance(instancesList);
|
||||||
@ -210,7 +198,7 @@ async function initDefaults() {
|
|||||||
lingvaNormalRedirectsChecks = [...redirects.lingva.normal]
|
lingvaNormalRedirectsChecks = [...redirects.lingva.normal]
|
||||||
for (const instance of r.cloudflareList) {
|
for (const instance of r.cloudflareList) {
|
||||||
let i;
|
let i;
|
||||||
|
|
||||||
i = simplyTranslateNormalRedirectsChecks.indexOf(instance);
|
i = simplyTranslateNormalRedirectsChecks.indexOf(instance);
|
||||||
if (i > -1) simplyTranslateNormalRedirectsChecks.splice(i, 1);
|
if (i > -1) simplyTranslateNormalRedirectsChecks.splice(i, 1);
|
||||||
|
|
||||||
@ -232,10 +220,6 @@ async function initDefaults() {
|
|||||||
lingvaNormalCustomRedirects: [],
|
lingvaNormalCustomRedirects: [],
|
||||||
lingvaTorRedirectsChecks: [...redirects.lingva.tor],
|
lingvaTorRedirectsChecks: [...redirects.lingva.tor],
|
||||||
lingvaTorCustomRedirects: [],
|
lingvaTorCustomRedirects: [],
|
||||||
|
|
||||||
translateFrom: "auto",
|
|
||||||
translateTo: 'en',
|
|
||||||
simplyTranslateEngine: 'google',
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -258,33 +242,24 @@ async function init() {
|
|||||||
"lingvaNormalCustomRedirects",
|
"lingvaNormalCustomRedirects",
|
||||||
"lingvaTorRedirectsChecks",
|
"lingvaTorRedirectsChecks",
|
||||||
"lingvaTorCustomRedirects",
|
"lingvaTorCustomRedirects",
|
||||||
|
|
||||||
"translateFrom",
|
|
||||||
"translateTo",
|
|
||||||
"simplyTranslateEngine",
|
|
||||||
],
|
],
|
||||||
result => {
|
r => {
|
||||||
disable = result.translateDisable;
|
disable = r.translateDisable;
|
||||||
frontend = result.translateFrontend;
|
frontend = r.translateFrontend;
|
||||||
protocol = result.translateProtocol;
|
protocol = r.translateProtocol;
|
||||||
|
redirects = r.translateRedirects;
|
||||||
|
|
||||||
from = result.translateFrom;
|
simplyTranslateNormalRedirectsChecks = r.simplyTranslateNormalRedirectsChecks;
|
||||||
to = result.translateTo;
|
simplyTranslateNormalCustomRedirects = r.simplyTranslateNormalCustomRedirects;
|
||||||
simplyTranslateEngine = result.simplyTranslateEngine;
|
|
||||||
|
|
||||||
redirects = result.translateRedirects;
|
simplyTranslateTorRedirectsChecks = r.simplyTranslateTorRedirectsChecks;
|
||||||
|
simplyTranslateTorCustomRedirects = r.simplyTranslateTorCustomRedirects;
|
||||||
|
|
||||||
simplyTranslateNormalRedirectsChecks = result.simplyTranslateNormalRedirectsChecks;
|
lingvaNormalRedirectsChecks = r.lingvaNormalRedirectsChecks;
|
||||||
simplyTranslateNormalCustomRedirects = result.simplyTranslateNormalCustomRedirects;
|
lingvaNormalCustomRedirects = r.lingvaNormalCustomRedirects;
|
||||||
|
|
||||||
simplyTranslateTorRedirectsChecks = result.simplyTranslateTorRedirectsChecks;
|
lingvaTorRedirectsChecks = r.lingvaTorRedirectsChecks;
|
||||||
simplyTranslateTorCustomRedirects = result.simplyTranslateTorCustomRedirects;
|
lingvaTorCustomRedirects = r.lingvaTorCustomRedirects;
|
||||||
|
|
||||||
lingvaNormalRedirectsChecks = result.lingvaNormalRedirectsChecks;
|
|
||||||
lingvaNormalCustomRedirects = result.lingvaNormalCustomRedirects;
|
|
||||||
|
|
||||||
lingvaTorRedirectsChecks = result.lingvaTorRedirectsChecks;
|
|
||||||
lingvaTorCustomRedirects = result.lingvaTorCustomRedirects;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,56 +42,14 @@ let nitterTorRedirectsChecks;
|
|||||||
let nitterTorCustomRedirects = [];
|
let nitterTorCustomRedirects = [];
|
||||||
|
|
||||||
let disable; // disableTwitter
|
let disable; // disableTwitter
|
||||||
let enableCustomSettings; // enableTwitterCustomSettings
|
|
||||||
|
|
||||||
let protocol; // twitterProtocol
|
let protocol; // twitterProtocol
|
||||||
let bypassWatchOnTwitter; // bypassWatchOnTwitter
|
|
||||||
let alwaysUsePreferred;
|
|
||||||
|
|
||||||
let
|
|
||||||
theme,
|
|
||||||
infiniteScroll,
|
|
||||||
stickyProfile,
|
|
||||||
bidiSupport,
|
|
||||||
hideTweetStats,
|
|
||||||
hideBanner,
|
|
||||||
hidePins,
|
|
||||||
hideReplies,
|
|
||||||
squareAvatars,
|
|
||||||
mp4Playback,
|
|
||||||
hlsPlayback,
|
|
||||||
proxyVideos,
|
|
||||||
muteVideos,
|
|
||||||
autoplayGifs;
|
|
||||||
|
|
||||||
|
|
||||||
function redirect(url, initiator) {
|
function redirect(url, initiator) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
if (disable) return;
|
||||||
let isNitter = [
|
if (!targets.some(rx => rx.test(url.href))) return;
|
||||||
...redirects.nitter.normal,
|
if (url.pathname.split("/").includes("home")) return;
|
||||||
...redirects.nitter.tor
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
let isCheckedNitter = [
|
|
||||||
...nitterNormalRedirectsChecks,
|
|
||||||
...nitterNormalCustomRedirects,
|
|
||||||
...nitterTorRedirectsChecks,
|
|
||||||
...nitterTorCustomRedirects
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
if (alwaysUsePreferred && isNitter && !isCheckedNitter) return switchInstance(url);
|
|
||||||
|
|
||||||
if (disable) return null;
|
|
||||||
|
|
||||||
if (!targets.some(rx => rx.test(url.href))) return null;
|
|
||||||
|
|
||||||
if (url.pathname.split("/").includes("home")) {
|
|
||||||
console.log("twitter homepage");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
bypassWatchOnTwitter &&
|
|
||||||
initiator &&
|
initiator &&
|
||||||
[...redirects.nitter.normal,
|
[...redirects.nitter.normal,
|
||||||
...redirects.nitter.tor,
|
...redirects.nitter.tor,
|
||||||
@ -177,10 +135,9 @@ function removeXFrameOptions(e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isNitter(url, type) {
|
function isNitter(url, type) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
|
||||||
|
|
||||||
if (type !== "main_frame" && type !== "sub_frame") return false;
|
if (type !== "main_frame" && type !== "sub_frame") return false;
|
||||||
|
|
||||||
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
return [
|
return [
|
||||||
...redirects.nitter.normal,
|
...redirects.nitter.normal,
|
||||||
...redirects.nitter.tor,
|
...redirects.nitter.tor,
|
||||||
@ -189,73 +146,70 @@ function isNitter(url, type) {
|
|||||||
].includes(protocolHost);
|
].includes(protocolHost);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initNitterCookies() {
|
async function initNitterCookies(from) {
|
||||||
if (enableCustomSettings) {
|
return new Promise(resolve => {
|
||||||
let checkedInstances;
|
browser.storage.local.get(
|
||||||
if (protocol == 'normal') checkedInstances = [...nitterNormalRedirectsChecks, ...nitterNormalCustomRedirects]
|
[
|
||||||
else if (protocol == 'tor') checkedInstances = [...nitterTorRedirectsChecks, ...nitterTorCustomRedirects]
|
"twitterProtocol",
|
||||||
|
"nitterNormalRedirectsChecks",
|
||||||
|
"nitterNormalCustomRedirects",
|
||||||
|
"nitterTorRedirectsChecks",
|
||||||
|
"nitterTorCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
|
if (![
|
||||||
|
...r.nitterNormalRedirectsChecks,
|
||||||
|
...r.nitterTorRedirectsChecks,
|
||||||
|
...r.nitterNormalCustomRedirects,
|
||||||
|
...r.nitterTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
|
||||||
for (const instanceUrl of checkedInstances) {
|
let checkedInstances;
|
||||||
browser.cookies.set({ url: instanceUrl, name: "theme", value: theme })
|
if (r.twitterProtocol == 'normal') checkedInstances = [...r.nitterNormalRedirectsChecks, ...r.nitterNormalCustomRedirects]
|
||||||
browser.cookies.set({ url: instanceUrl, name: "infiniteScroll", value: infiniteScroll ? 'on' : '' })
|
else if (r.twitterProtocol == 'tor') checkedInstances = [...r.nitterTorRedirectsChecks, ...r.nitterTorCustomRedirects]
|
||||||
browser.cookies.set({ url: instanceUrl, name: "stickyProfile", value: stickyProfile ? 'on' : '' })
|
|
||||||
browser.cookies.set({ url: instanceUrl, name: "bidiSupport", value: bidiSupport ? 'on' : '', })
|
for (const to of checkedInstances) {
|
||||||
browser.cookies.set({ url: instanceUrl, name: "hideTweetStats", value: hideTweetStats ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'theme');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "hideBanner", value: hideBanner ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'infiniteScroll');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "hidePins", value: hidePins ? 'on' : '', })
|
commonHelper.copyCookie('nitter', from, to, 'stickyProfile');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "hideReplies", value: hideReplies ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'bidiSupport');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "squareAvatars", value: squareAvatars ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'hideTweetStats');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "mp4Playback", value: mp4Playback ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'hideBanner');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "hlsPlayback", value: hlsPlayback ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'hidePins');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "proxyVideos", value: proxyVideos ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'hideReplies');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "muteVideos", value: muteVideos ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'squareAvatars');
|
||||||
browser.cookies.set({ url: instanceUrl, name: "autoplayGifs", value: autoplayGifs ? 'on' : '' })
|
commonHelper.copyCookie('nitter', from, to, 'mp4Playback');
|
||||||
}
|
commonHelper.copyCookie('nitter', from, to, 'hlsPlayback');
|
||||||
}
|
commonHelper.copyCookie('nitter', from, to, 'proxyVideos');
|
||||||
|
commonHelper.copyCookie('nitter', from, to, 'muteVideos');
|
||||||
|
commonHelper.copyCookie('nitter', from, to, 'autoplayGifs');
|
||||||
|
}
|
||||||
|
resolve(true);
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function initDefaults() {
|
||||||
async function initDefaults() {
|
fetch('/instances/data.json').then(response => response.text()).then(data => {
|
||||||
await fetch('/instances/data.json').then(response => response.text()).then(async data => {
|
|
||||||
let dataJson = JSON.parse(data);
|
let dataJson = JSON.parse(data);
|
||||||
redirects.nitter = dataJson.nitter;
|
redirects.nitter = dataJson.nitter;
|
||||||
browser.storage.local.get('cloudflareList', async r => {
|
browser.storage.local.get('cloudflareList', r => {
|
||||||
nitterNormalRedirectsChecks = [...redirects.nitter.normal];
|
nitterNormalRedirectsChecks = [...redirects.nitter.normal];
|
||||||
for (const instance of r.cloudflareList) {
|
for (const instance of r.cloudflareList) {
|
||||||
let i = nitterNormalRedirectsChecks.indexOf(instance);
|
let i = nitterNormalRedirectsChecks.indexOf(instance);
|
||||||
if (i > -1) nitterNormalRedirectsChecks.splice(i, 1);
|
if (i > -1) nitterNormalRedirectsChecks.splice(i, 1);
|
||||||
}
|
}
|
||||||
await browser.storage.local.set({
|
browser.storage.local.set({
|
||||||
disableTwitter: false,
|
disableTwitter: false,
|
||||||
|
|
||||||
enableTwitterCustomSettings: false,
|
|
||||||
|
|
||||||
twitterRedirects: redirects,
|
twitterRedirects: redirects,
|
||||||
bypassWatchOnTwitter: true,
|
twitterProtocol: "normal",
|
||||||
|
|
||||||
nitterNormalRedirectsChecks: nitterNormalRedirectsChecks,
|
nitterNormalRedirectsChecks: nitterNormalRedirectsChecks,
|
||||||
nitterNormalCustomRedirects: [],
|
nitterNormalCustomRedirects: [],
|
||||||
|
|
||||||
nitterTorRedirectsChecks: [...redirects.nitter.tor],
|
nitterTorRedirectsChecks: [...redirects.nitter.tor],
|
||||||
nitterTorCustomRedirects: [],
|
nitterTorCustomRedirects: [],
|
||||||
|
|
||||||
twitterProtocol: "normal",
|
|
||||||
alwaysUsePreferred: false,
|
|
||||||
|
|
||||||
nitterTheme: 'Auto',
|
|
||||||
nitterInfiniteScroll: false,
|
|
||||||
nitterStickyProfile: true,
|
|
||||||
nitterBidiSupport: false,
|
|
||||||
nitterHideTweetStats: false,
|
|
||||||
nitterHideBanner: false,
|
|
||||||
nitterHidePins: false,
|
|
||||||
nitterHideReplies: false,
|
|
||||||
nitterSquareAvatars: false,
|
|
||||||
nitterMp4Playback: true,
|
|
||||||
nitterHlsPlayback: false,
|
|
||||||
nitterProxyVideos: true,
|
|
||||||
nitterMuteVideos: false,
|
|
||||||
nitterAutoplayGifs: true,
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -265,46 +219,18 @@ async function init() {
|
|||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disableTwitter",
|
"disableTwitter",
|
||||||
|
|
||||||
"enableTwitterCustomSettings",
|
|
||||||
|
|
||||||
"twitterRedirects",
|
"twitterRedirects",
|
||||||
"bypassWatchOnTwitter",
|
"twitterProtocol",
|
||||||
|
|
||||||
"nitterNormalRedirectsChecks",
|
"nitterNormalRedirectsChecks",
|
||||||
"nitterNormalCustomRedirects",
|
"nitterNormalCustomRedirects",
|
||||||
|
|
||||||
"nitterTorRedirectsChecks",
|
"nitterTorRedirectsChecks",
|
||||||
"nitterTorCustomRedirects",
|
"nitterTorCustomRedirects",
|
||||||
|
|
||||||
"twitterProtocol",
|
|
||||||
"alwaysUsePreferred",
|
|
||||||
|
|
||||||
"nitterTheme",
|
|
||||||
"nitterInfiniteScroll",
|
|
||||||
"nitterStickyProfile",
|
|
||||||
"nitterBidiSupport",
|
|
||||||
"nitterHideTweetStats",
|
|
||||||
"nitterHideBanner",
|
|
||||||
"nitterHidePins",
|
|
||||||
"nitterHideReplies",
|
|
||||||
"nitterSquareAvatars",
|
|
||||||
"nitterMp4Playback",
|
|
||||||
"nitterHlsPlayback",
|
|
||||||
"nitterProxyVideos",
|
|
||||||
"nitterMuteVideos",
|
|
||||||
"nitterAutoplayGifs",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disable = r.disableTwitter;
|
disable = r.disableTwitter;
|
||||||
enableCustomSettings = r.enableTwitterCustomSettings;
|
|
||||||
|
|
||||||
protocol = r.twitterProtocol;
|
protocol = r.twitterProtocol;
|
||||||
|
|
||||||
bypassWatchOnTwitter = r.bypassWatchOnTwitter;
|
|
||||||
|
|
||||||
alwaysUsePreferred = r.alwaysUsePreferred;
|
|
||||||
|
|
||||||
redirects = r.twitterRedirects;
|
redirects = r.twitterRedirects;
|
||||||
|
|
||||||
nitterNormalRedirectsChecks = r.nitterNormalRedirectsChecks;
|
nitterNormalRedirectsChecks = r.nitterNormalRedirectsChecks;
|
||||||
@ -312,21 +238,6 @@ async function init() {
|
|||||||
|
|
||||||
nitterTorRedirectsChecks = r.nitterTorRedirectsChecks;
|
nitterTorRedirectsChecks = r.nitterTorRedirectsChecks;
|
||||||
nitterTorCustomRedirects = r.nitterTorCustomRedirects;
|
nitterTorCustomRedirects = r.nitterTorCustomRedirects;
|
||||||
|
|
||||||
theme = r.nitterTheme;
|
|
||||||
infiniteScroll = r.nitterInfiniteScroll;
|
|
||||||
stickyProfile = r.nitterStickyProfile;
|
|
||||||
bidiSupport = r.nitterBidiSupport;
|
|
||||||
hideTweetStats = r.nitterHideTweetStats;
|
|
||||||
hideBanner = r.nitterHideBanner;
|
|
||||||
hidePins = r.nitterHidePins;
|
|
||||||
hideReplies = r.nitterHideReplies;
|
|
||||||
squareAvatars = r.nitterSquareAvatars;
|
|
||||||
mp4Playback = r.nitterMp4Playback;
|
|
||||||
hlsPlayback = r.nitterHlsPlayback;
|
|
||||||
proxyVideos = r.nitterProxyVideos;
|
|
||||||
muteVideos = r.nitterMuteVideos;
|
|
||||||
autoplayGifs = r.nitterAutoplayGifs;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ let redirects = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getRedirects = () => redirects;
|
const getRedirects = () => redirects;
|
||||||
|
|
||||||
function setRedirects(val) {
|
function setRedirects(val) {
|
||||||
redirects.wikiless = val;
|
redirects.wikiless = val;
|
||||||
browser.storage.local.set({ wikipediaRedirects: redirects })
|
browser.storage.local.set({ wikipediaRedirects: redirects })
|
||||||
@ -39,34 +38,52 @@ function setRedirects(val) {
|
|||||||
browser.storage.local.set({ wikilessI2pRedirectsChecks })
|
browser.storage.local.set({ wikilessI2pRedirectsChecks })
|
||||||
}
|
}
|
||||||
|
|
||||||
let disable; // disableWikipedia
|
let
|
||||||
let protocol; // wikipediaProtocol
|
disable, // disableWikipedia
|
||||||
|
protocol; // wikipediaProtocol
|
||||||
|
|
||||||
let wikilessNormalRedirectsChecks;
|
let
|
||||||
let wikilessTorRedirectsChecks;
|
wikilessNormalRedirectsChecks,
|
||||||
let wikilessI2pRedirectsChecks;
|
wikilessTorRedirectsChecks,
|
||||||
let wikilessNormalCustomRedirects = [];
|
wikilessI2pRedirectsChecks,
|
||||||
let wikilessTorCustomRedirects = [];
|
wikilessNormalCustomRedirects,
|
||||||
let wikilessI2pCustomRedirects = [];
|
wikilessTorCustomRedirects,
|
||||||
|
wikilessI2pCustomRedirects;
|
||||||
|
|
||||||
let theme;
|
|
||||||
let applyThemeToSites;
|
|
||||||
|
|
||||||
function initWikilessCookies() {
|
function initWikilessCookies() {
|
||||||
let themeValue;
|
return new Promise(resolve => {
|
||||||
if (theme == 'light') themeValue = 'white';
|
browser.storage.local.get(
|
||||||
if (theme == 'dark') themeValue = 'dark';
|
[
|
||||||
if (applyThemeToSites && themeValue) {
|
"wikipediaProtocol",
|
||||||
|
"wikilessNormalRedirectsChecks",
|
||||||
|
"wikilessNormalCustomRedirects",
|
||||||
|
"wikilessTorRedirectsChecks",
|
||||||
|
"wikilessTorCustomRedirects",
|
||||||
|
"wikilessI2pRedirectsChecks",
|
||||||
|
"wikilessI2pCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
|
if (![
|
||||||
|
...r.wikilessNormalRedirectsChecks,
|
||||||
|
...r.wikilessNormalCustomRedirects,
|
||||||
|
...r.wikilessTorRedirectsChecks,
|
||||||
|
...r.wikilessTorCustomRedirects,
|
||||||
|
...r.wikilessI2pRedirectsChecks,
|
||||||
|
...r.wikilessI2pCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
|
||||||
let checkedInstances;
|
let checkedInstances;
|
||||||
if (protocol == 'normal') checkedInstances = [...wikilessNormalRedirectsChecks, ...wikilessNormalCustomRedirects]
|
if (r.wikipediaProtocol == 'normal') checkedInstances = [...r.wikilessNormalRedirectsChecks, ...r.wikilessNormalCustomRedirects]
|
||||||
else if (protocol == 'tor') checkedInstances = [...wikilessTorRedirectsChecks, ...wikilessTorCustomRedirects]
|
else if (r.wikipediaProtocol == 'tor') checkedInstances = [...r.wikilessTorRedirectsChecks, ...r.wikilessTorCustomRedirects]
|
||||||
else if (protocol == 'i2p') checkedInstances = [...wikilessI2pRedirectsChecks, ...wikilessI2pCustomRedirects]
|
else if (r.wikipediaProtocol == 'i2p') checkedInstances = [...r.wikilessI2pRedirectsChecks, ...r.wikilessI2pCustomRedirects]
|
||||||
|
|
||||||
for (const instanceUrl of checkedInstances)
|
for (const to of checkedInstances)
|
||||||
browser.cookies.set({ url: instanceUrl, name: "theme", value: themeValue })
|
commonHelper.copyCookie('wikiless', from, to, 'theme');
|
||||||
}
|
resolve(true);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirect(url) {
|
function redirect(url) {
|
||||||
@ -104,7 +121,6 @@ function redirect(url) {
|
|||||||
link += (i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1];
|
link += (i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1];
|
||||||
|
|
||||||
return link;
|
return link;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchInstance(url) {
|
function switchInstance(url) {
|
||||||
@ -126,7 +142,6 @@ function switchInstance(url) {
|
|||||||
else if (protocol == 'tor') instancesList = [...wikilessTorCustomRedirects, ...wikilessTorRedirectsChecks];
|
else if (protocol == 'tor') instancesList = [...wikilessTorCustomRedirects, ...wikilessTorRedirectsChecks];
|
||||||
else if (protocol == 'i2p') instancesList = [...wikilessI2pCustomRedirects, ...wikilessI2pRedirectsChecks];
|
else if (protocol == 'i2p') instancesList = [...wikilessI2pCustomRedirects, ...wikilessI2pRedirectsChecks];
|
||||||
|
|
||||||
console.log("instancesList", instancesList);
|
|
||||||
let index = instancesList.indexOf(protocolHost);
|
let index = instancesList.indexOf(protocolHost);
|
||||||
if (index > -1) instancesList.splice(index, 1);
|
if (index > -1) instancesList.splice(index, 1);
|
||||||
|
|
||||||
@ -136,7 +151,6 @@ function switchInstance(url) {
|
|||||||
return `${randomInstance}${url.pathname}${url.search}`;
|
return `${randomInstance}${url.pathname}${url.search}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function initDefaults() {
|
async function initDefaults() {
|
||||||
fetch('/instances/data.json').then(response => response.text()).then(async data => {
|
fetch('/instances/data.json').then(response => response.text()).then(async data => {
|
||||||
let dataJson = JSON.parse(data);
|
let dataJson = JSON.parse(data);
|
||||||
@ -144,24 +158,19 @@ async function initDefaults() {
|
|||||||
browser.storage.local.get('cloudflareList', async r => {
|
browser.storage.local.get('cloudflareList', async r => {
|
||||||
wikilessNormalRedirectsChecks = [...redirects.wikiless.normal];
|
wikilessNormalRedirectsChecks = [...redirects.wikiless.normal];
|
||||||
for (const instance of r.cloudflareList) {
|
for (const instance of r.cloudflareList) {
|
||||||
let i;
|
let i = wikilessNormalRedirectsChecks.indexOf(instance);
|
||||||
|
|
||||||
i = wikilessNormalRedirectsChecks.indexOf(instance);
|
|
||||||
if (i > -1) wikilessNormalRedirectsChecks.splice(i, 1);
|
if (i > -1) wikilessNormalRedirectsChecks.splice(i, 1);
|
||||||
}
|
}
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableWikipedia: true,
|
disableWikipedia: true,
|
||||||
wikipediaRedirects: redirects,
|
wikipediaRedirects: redirects,
|
||||||
|
wikipediaProtocol: "normal",
|
||||||
wikilessNormalRedirectsChecks: wikilessNormalRedirectsChecks,
|
wikilessNormalRedirectsChecks: wikilessNormalRedirectsChecks,
|
||||||
wikilessTorRedirectsChecks: [...redirects.wikiless.tor],
|
wikilessTorRedirectsChecks: [...redirects.wikiless.tor],
|
||||||
wikilessI2pRedirectsChecks: [...redirects.wikiless.i2p],
|
wikilessI2pRedirectsChecks: [...redirects.wikiless.i2p],
|
||||||
wikilessNormalCustomRedirects: [],
|
wikilessNormalCustomRedirects: [],
|
||||||
wikilessTorCustomRedirects: [],
|
wikilessTorCustomRedirects: [],
|
||||||
wikilessI2pCustomRedirects: [],
|
wikilessI2pCustomRedirects: [],
|
||||||
wikipediaProtocol: "normal",
|
|
||||||
|
|
||||||
theme: 'DEFAULT',
|
|
||||||
applyThemeToSites: false,
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -172,20 +181,17 @@ async function init() {
|
|||||||
[
|
[
|
||||||
"disableWikipedia",
|
"disableWikipedia",
|
||||||
"wikipediaRedirects",
|
"wikipediaRedirects",
|
||||||
|
"wikipediaProtocol",
|
||||||
|
|
||||||
"wikilessNormalRedirectsChecks",
|
"wikilessNormalRedirectsChecks",
|
||||||
"wikilessTorRedirectsChecks",
|
"wikilessTorRedirectsChecks",
|
||||||
"wikilessI2pRedirectsChecks",
|
"wikilessI2pRedirectsChecks",
|
||||||
"wikilessNormalCustomRedirects",
|
"wikilessNormalCustomRedirects",
|
||||||
"wikilessTorCustomRedirects",
|
"wikilessTorCustomRedirects",
|
||||||
"wikilessI2pCustomRedirects",
|
"wikilessI2pCustomRedirects",
|
||||||
"wikipediaProtocol",
|
],
|
||||||
|
r => {
|
||||||
"theme",
|
|
||||||
"applyThemeToSites",
|
|
||||||
|
|
||||||
], r => {
|
|
||||||
disable = r.disableWikipedia;
|
disable = r.disableWikipedia;
|
||||||
|
|
||||||
protocol = r.wikipediaProtocol;
|
protocol = r.wikipediaProtocol;
|
||||||
redirects = r.wikipediaRedirects;
|
redirects = r.wikipediaRedirects;
|
||||||
|
|
||||||
@ -197,9 +203,6 @@ async function init() {
|
|||||||
|
|
||||||
wikilessI2pRedirectsChecks = r.wikilessI2pRedirectsChecks;
|
wikilessI2pRedirectsChecks = r.wikilessI2pRedirectsChecks;
|
||||||
wikilessI2pCustomRedirects = r.wikilessI2pCustomRedirects;
|
wikilessI2pCustomRedirects = r.wikilessI2pCustomRedirects;
|
||||||
|
|
||||||
theme = r.theme;
|
|
||||||
applyThemeToSites = r.applyThemeToSites;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
22
src/assets/javascripts/helpers/youtube/get_piped_settings.js
Normal file
22
src/assets/javascripts/helpers/youtube/get_piped_settings.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
|
browser.storage.local.set(
|
||||||
|
{
|
||||||
|
'piped_bufferGoal': localStorage.getItem("bufferGoal"),
|
||||||
|
'piped_comments': localStorage.getItem("comments"),
|
||||||
|
'piped_disableLBRY': localStorage.getItem("disableLBRY"),
|
||||||
|
'piped_enabledCodecs': localStorage.getItem("enabledCodecs"),
|
||||||
|
'piped_homepage': localStorage.getItem("homepage"),
|
||||||
|
'piped_listen': localStorage.getItem("listen"),
|
||||||
|
'piped_minimizeDescription': localStorage.getItem("minimizeDescription"),
|
||||||
|
'piped_playerAutoPlay': localStorage.getItem("playerAutoPlay"),
|
||||||
|
'piped_proxyLBRY': localStorage.getItem("proxyLBRY"),
|
||||||
|
'piped_quality': localStorage.getItem("quality"),
|
||||||
|
'piped_region': localStorage.getItem("region"),
|
||||||
|
'piped_selectedSkip': localStorage.getItem("selectedSkip"),
|
||||||
|
'piped_sponsorblock': localStorage.getItem("sponsorblock"),
|
||||||
|
'piped_theme': localStorage.getItem("theme"),
|
||||||
|
'piped_volume': localStorage.getItem("volume"),
|
||||||
|
'piped_watchHistory': localStorage.getItem("watchHistory"),
|
||||||
|
}
|
||||||
|
)
|
@ -1,133 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
|
|
||||||
window.browser = window.browser || window.chrome;
|
|
||||||
|
|
||||||
async function initDefaults() {
|
|
||||||
await browser.storage.local.set({
|
|
||||||
youtubeListen: false,
|
|
||||||
youtubeVolume: 100,
|
|
||||||
youtubeAutoplay: false,
|
|
||||||
invidiousAlwaysProxy: false,
|
|
||||||
invidiousQuality: 'hd720',
|
|
||||||
invidiousPlayerStyle: 'invidious',
|
|
||||||
invidiousVideoLoop: false,
|
|
||||||
invidiousContinueAutoplay: true,
|
|
||||||
invidiousContinue: false,
|
|
||||||
invidiousSpeed: '1.0',
|
|
||||||
invidiousQualityDash: 'auto',
|
|
||||||
invidiousComments: ['youtube', ''],
|
|
||||||
invidiousCaptions: ['', '', ''],
|
|
||||||
invidiousRelatedVideos: true,
|
|
||||||
invidiousAnnotations: false,
|
|
||||||
invidiousExtendDesc: false,
|
|
||||||
invidiousVrMode: true,
|
|
||||||
invidiousSavePlayerPos: false,
|
|
||||||
invidiousRegion: 'US',
|
|
||||||
invidiousDarkMode: '',
|
|
||||||
invidiousThinMode: false,
|
|
||||||
invidiousDefaultHome: 'Popular',
|
|
||||||
invidiousFeedMenuList: ['Popular', 'Trending']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async function initInvidiousCookies() {
|
|
||||||
console.log('initInvidiousCookies() starting')
|
|
||||||
await browser.storage.local.get(
|
|
||||||
[
|
|
||||||
"disableYoutube",
|
|
||||||
"youtubeFrontend",
|
|
||||||
"youtubeProtocol",
|
|
||||||
|
|
||||||
"enableYoutubeCustomSettings",
|
|
||||||
|
|
||||||
"invidiousNormalRedirectsChecks",
|
|
||||||
"invidiousNormalCustomRedirects",
|
|
||||||
"invidiousTorRedirectsChecks",
|
|
||||||
"invidiousTorCustomRedirects",
|
|
||||||
|
|
||||||
"youtubeListen",
|
|
||||||
"youtubeVolume",
|
|
||||||
"youtubeAutoplay",
|
|
||||||
"invidiousQuality",
|
|
||||||
"invidiousAlwaysProxy",
|
|
||||||
"invidiousQuality",
|
|
||||||
"invidiousPlayerStyle",
|
|
||||||
"invidiousVideoLoop",
|
|
||||||
"invidiousContinueAutoplay",
|
|
||||||
"invidiousContinue",
|
|
||||||
"invidiousSpeed",
|
|
||||||
"invidiousQualityDash",
|
|
||||||
"invidiousComments",
|
|
||||||
"invidiousCaptions",
|
|
||||||
"invidiousRelatedVideos",
|
|
||||||
"invidiousAnnotations",
|
|
||||||
"invidiousExtendDesc",
|
|
||||||
"invidiousVrMode",
|
|
||||||
"invidiousSavePlayerPos",
|
|
||||||
"invidiousRegion",
|
|
||||||
"invidiousDarkMode",
|
|
||||||
"invidiousThinMode",
|
|
||||||
"invidiousDefaultHome",
|
|
||||||
"invidiousFeedMenuList",
|
|
||||||
],
|
|
||||||
r => {
|
|
||||||
if (!r.disableYoutube && r.youtubeFrontend == 'invidious' && r.enableYoutubeCustomSettings) {
|
|
||||||
let checkedInstances;
|
|
||||||
if (r.youtubeProtocol == 'normal')
|
|
||||||
checkedInstances = [...r.invidiousNormalRedirectsChecks, ...r.invidiousNormalCustomRedirects]
|
|
||||||
else if (r.youtubeProtocol == 'tor')
|
|
||||||
checkedInstances = [...r.invidiousTorRedirectsChecks, ...r.invidiousTorCustomRedirects]
|
|
||||||
|
|
||||||
for (const instanceUrl of checkedInstances)
|
|
||||||
browser.cookies.get(
|
|
||||||
{ url: instanceUrl, name: "PREFS" },
|
|
||||||
cookie => {
|
|
||||||
let prefs = {};
|
|
||||||
if (cookie) {
|
|
||||||
prefs = JSON.parse(decodeURIComponent(cookie.value));
|
|
||||||
browser.cookies.remove({ url: instanceUrl, name: "PREFS" });
|
|
||||||
}
|
|
||||||
|
|
||||||
prefs.local = r.invidiousAlwaysProxy;
|
|
||||||
prefs.video_loop = r.invidiousVideoLoop;
|
|
||||||
prefs.continue_autoplay = r.invidiousContinueAutoplay;
|
|
||||||
prefs.continue = r.invidiousContinue;
|
|
||||||
prefs.listen = r.youtubeListen;
|
|
||||||
prefs.speed = parseFloat(r.invidiousSpeed);
|
|
||||||
prefs.quality = r.invidiousQuality;
|
|
||||||
prefs.quality_dash = r.invidiousQualityDash;
|
|
||||||
|
|
||||||
prefs.comments = r.invidiousComments;
|
|
||||||
prefs.captions = r.invidiousCaptions;
|
|
||||||
|
|
||||||
prefs.related_videos = r.invidiousRelatedVideos;
|
|
||||||
prefs.annotations = r.invidiousAnnotations
|
|
||||||
prefs.extend_desc = r.invidiousExtendDesc;
|
|
||||||
prefs.vr_mode = r.invidiousVrMode;
|
|
||||||
prefs.save_player_pos = r.invidiousSavePlayerPos;
|
|
||||||
|
|
||||||
prefs.volume = parseInt(r.youtubeVolume);
|
|
||||||
prefs.player_style = r.invidiousPlayerStyle;
|
|
||||||
prefs.autoplay = r.youtubeAutoplay;
|
|
||||||
|
|
||||||
prefs.region = r.invidiousRegion;
|
|
||||||
prefs.dark_mode = r.invidiousDarkMode;
|
|
||||||
prefs.thin_mode = r.invidiousThinMode;
|
|
||||||
prefs.default_home = r.invidiousDefaultHome;
|
|
||||||
prefs.feed_menu = r.invidiousFeedMenuList;
|
|
||||||
|
|
||||||
browser.cookies.set({
|
|
||||||
url: instanceUrl, name: "PREFS",
|
|
||||||
value: encodeURIComponent(JSON.stringify(prefs))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
initDefaults,
|
|
||||||
initInvidiousCookies,
|
|
||||||
}
|
|
@ -2,40 +2,39 @@ window.browser = window.browser || window.chrome;
|
|||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"youtubeVolume",
|
"piped_bufferGoal",
|
||||||
"youtubeAutoplay",
|
"piped_comments",
|
||||||
"youtubeListen",
|
"piped_disableLBRY",
|
||||||
|
"piped_enabledCodecs",
|
||||||
"pipedBufferGoal",
|
"piped_homepage",
|
||||||
"pipedComments",
|
"piped_listen",
|
||||||
"pipedDisableLBRY",
|
"piped_minimizeDescription",
|
||||||
"pipedEnabledCodecs",
|
"piped_playerAutoPlay",
|
||||||
"pipedHomepage",
|
"piped_proxyLBRY",
|
||||||
"pipedMinimizeDescription",
|
"piped_quality",
|
||||||
"pipedProxyLBRY",
|
"piped_region",
|
||||||
"pipedQuality",
|
"piped_selectedSkip",
|
||||||
"pipedRegion",
|
"piped_sponsorblock",
|
||||||
"pipedSelectedSkip",
|
"piped_theme",
|
||||||
"pipedSponsorblock",
|
"piped_volume",
|
||||||
"pipedDdlTheme",
|
"piped_watchHistory",
|
||||||
"pipedWatchHistory",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
localStorage.setItem("bufferGoal", r.pipedBufferGoal.toString());
|
localStorage.setItem("bufferGoal", r.piped_bufferGoal);
|
||||||
localStorage.setItem("comments", r.pipedComments);
|
localStorage.setItem("comments", r.piped_comments);
|
||||||
localStorage.setItem("disableLBRY", r.pipedDisableLBRY);
|
localStorage.setItem("disableLBRY", r.piped_disableLBRY);
|
||||||
localStorage.setItem("enabledCodecs", r.pipedEnabledCodecs);
|
localStorage.setItem("enabledCodecs", r.piped_enabledCodecs);
|
||||||
localStorage.setItem("homepage", r.pipedHomepage);
|
localStorage.setItem("homepage", r.piped_homepage);
|
||||||
localStorage.setItem("listen", r.youtubeListen);
|
localStorage.setItem("listen", r.piped_listen);
|
||||||
localStorage.setItem("minimizeDescription", r.pipedMinimizeDescription);
|
localStorage.setItem("minimizeDescription", r.piped_minimizeDescription);
|
||||||
localStorage.setItem("playerAutoPlay", r.youtubeAutoplay);
|
localStorage.setItem("playerAutoPlay", r.piped_playerAutoPlay);
|
||||||
localStorage.setItem("proxyLBRY", r.pipedProxyLBRY);
|
localStorage.setItem("proxyLBRY", r.piped_proxyLBRY);
|
||||||
localStorage.setItem("quality", r.pipedQuality);
|
localStorage.setItem("quality", r.piped_quality);
|
||||||
localStorage.setItem("region", r.pipedRegion);
|
localStorage.setItem("region", r.piped_region);
|
||||||
localStorage.setItem("selectedSkip", r.pipedSelectedSkip);
|
localStorage.setItem("selectedSkip", r.piped_selectedSkip);
|
||||||
localStorage.setItem("sponsorblock", r.pipedSponsorblock);
|
localStorage.setItem("sponsorblock", r.piped_sponsorblock);
|
||||||
localStorage.setItem("theme", r.pipedDdlTheme);
|
localStorage.setItem("theme", r.piped_theme);
|
||||||
localStorage.setItem("volume", r.youtubeVolume / 100);
|
localStorage.setItem("volume", r.piped_volume);
|
||||||
localStorage.setItem("watchHistory", r.pipedWatchHistory);
|
localStorage.setItem("watchHistory", r.piped_watchHistory);
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -1,27 +1,76 @@
|
|||||||
async function initDefaults() {
|
"use strict";
|
||||||
await browser.storage.local.set({
|
window.browser = window.browser || window.chrome;
|
||||||
youtubeVolume: 100,
|
|
||||||
youtubeAutoplay: false,
|
|
||||||
youtubeListen: false,
|
|
||||||
|
|
||||||
pipedBufferGoal: 300,
|
import commonHelper from '../common.js'
|
||||||
pipedComments: true,
|
|
||||||
pipedDisableLBRY: false,
|
async function initDefaults() {
|
||||||
pipedEnabledCodecs: ["av1", "vp9", "avc"],
|
await browser.storage.local.set({
|
||||||
pipedHomepage: "trending",
|
youtubeVolume: 100,
|
||||||
pipedMinimizeDescription: false,
|
youtubeAutoplay: false,
|
||||||
pipedProxyLBRY: false,
|
youtubeListen: false,
|
||||||
pipedQuality: 0,
|
|
||||||
pipedRegion: "US",
|
pipedBufferGoal: 300,
|
||||||
pipedSelectedSkip: ["sponsor", "interaction", "selfpromo", "music_offtopic"],
|
pipedComments: true,
|
||||||
pipedSponsorblock: true,
|
pipedDisableLBRY: false,
|
||||||
pipedDdlTheme: 'auto',
|
pipedEnabledCodecs: ["av1", "vp9", "avc"],
|
||||||
pipedWatchHistory: false,
|
pipedHomepage: "trending",
|
||||||
})
|
pipedMinimizeDescription: false,
|
||||||
|
pipedProxyLBRY: false,
|
||||||
|
pipedQuality: 0,
|
||||||
|
pipedRegion: "US",
|
||||||
|
pipedSelectedSkip: ["sponsor", "interaction", "selfpromo", "music_offtopic"],
|
||||||
|
pipedSponsorblock: true,
|
||||||
|
pipedDdlTheme: 'auto',
|
||||||
|
pipedWatchHistory: false,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function initPipedLocalStorage(tabId) {
|
async function copyPipedLocalStorage(url, tabId) {
|
||||||
if (!disable && frontend == 'piped' && enableCustomSettings)
|
return new Promise(resolve => {
|
||||||
|
browser.storage.local.get(
|
||||||
|
[
|
||||||
|
"pipedNormalRedirectsChecks",
|
||||||
|
"pipedNormalCustomRedirects",
|
||||||
|
"pipedTorRedirectsChecks",
|
||||||
|
"pipedTorCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
|
if (![
|
||||||
|
...r.pipedNormalCustomRedirects,
|
||||||
|
...r.pipedNormalRedirectsChecks,
|
||||||
|
...r.pipedTorRedirectsChecks,
|
||||||
|
...r.pipedTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
browser.tabs.executeScript(
|
||||||
|
tabId,
|
||||||
|
{
|
||||||
|
file: "/assets/javascripts/helpers/youtube/get_piped_settings.js",
|
||||||
|
runAt: "document_start"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
resolve(true);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function initPipedLocalStorage(url, tabId) {
|
||||||
|
browser.storage.local.get(
|
||||||
|
[
|
||||||
|
"youtubeProtocol",
|
||||||
|
"pipedNormalRedirectsChecks",
|
||||||
|
"pipedNormalCustomRedirects",
|
||||||
|
"pipedTorRedirectsChecks",
|
||||||
|
"pipedTorCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
|
if (![
|
||||||
|
...r.pipedNormalRedirectsChecks,
|
||||||
|
...r.pipedTorRedirectsChecks,
|
||||||
|
...r.pipedNormalCustomRedirects,
|
||||||
|
...r.pipedTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) return;
|
||||||
browser.tabs.executeScript(
|
browser.tabs.executeScript(
|
||||||
tabId,
|
tabId,
|
||||||
{
|
{
|
||||||
@ -29,9 +78,12 @@ function initPipedLocalStorage(tabId) {
|
|||||||
runAt: "document_start"
|
runAt: "document_start"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
return true;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
initDefaults,
|
initDefaults,
|
||||||
initPipedLocalStorage
|
initPipedLocalStorage,
|
||||||
|
copyPipedLocalStorage,
|
||||||
}
|
}
|
@ -3,7 +3,6 @@
|
|||||||
window.browser = window.browser || window.chrome;
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
import commonHelper from '../common.js'
|
import commonHelper from '../common.js'
|
||||||
import invidious from './invidious.js'
|
|
||||||
import piped from './piped.js';
|
import piped from './piped.js';
|
||||||
import pipedMaterial from './pipedMaterial.js';
|
import pipedMaterial from './pipedMaterial.js';
|
||||||
|
|
||||||
@ -62,63 +61,27 @@ let
|
|||||||
protocol,
|
protocol,
|
||||||
OnlyEmbeddedVideo,
|
OnlyEmbeddedVideo,
|
||||||
frontend,
|
frontend,
|
||||||
youtubeEmbedFrontend,
|
youtubeEmbedFrontend;
|
||||||
bypassWatchOnYoutube,
|
|
||||||
alwaysUsePreferred;
|
|
||||||
|
|
||||||
function redirect(url, details, initiator) {
|
function redirect(url, details, initiator) {
|
||||||
if (disable) return null;
|
if (disable) return null;
|
||||||
|
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
|
|
||||||
let isInvidious = [
|
|
||||||
...redirects.invidious.normal,
|
|
||||||
...redirects.invidious.tor
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
let isCheckedInvidious = [
|
|
||||||
...invidiousNormalRedirectsChecks,
|
|
||||||
...invidiousNormalCustomRedirects,
|
|
||||||
...invidiousTorRedirectsChecks,
|
|
||||||
...invidiousTorCustomRedirects,
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
let isPiped = [
|
|
||||||
...redirects.piped.normal,
|
|
||||||
...redirects.piped.tor
|
|
||||||
].includes(protocolHost);
|
|
||||||
|
|
||||||
let isCheckedPiped = [
|
|
||||||
...pipedNormalRedirectsChecks,
|
|
||||||
...pipedNormalCustomRedirects,
|
|
||||||
...pipedTorRedirectsChecks,
|
|
||||||
...pipedTorCustomRedirects,
|
|
||||||
].includes(protocolHost)
|
|
||||||
|
|
||||||
if (
|
|
||||||
alwaysUsePreferred && frontend == 'invidious' &&
|
|
||||||
(isInvidious || isPiped) && !isCheckedInvidious
|
|
||||||
) return switchInstance(url);
|
|
||||||
|
|
||||||
if (
|
|
||||||
alwaysUsePreferred && frontend == 'piped' &&
|
|
||||||
(isInvidious || isPiped) && !isCheckedPiped
|
|
||||||
) return switchInstance(url);
|
|
||||||
|
|
||||||
if (!targets.some(rx => rx.test(url.href))) return null;
|
if (!targets.some(rx => rx.test(url.href))) return null;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
bypassWatchOnYoutube &&
|
|
||||||
initiator && (
|
initiator && (
|
||||||
[...redirects.invidious.normal,
|
[
|
||||||
...invidiousNormalCustomRedirects,
|
...redirects.invidious.normal,
|
||||||
...redirects.invidious.tor,
|
...invidiousNormalCustomRedirects,
|
||||||
...invidiousTorCustomRedirects,
|
...redirects.invidious.tor,
|
||||||
|
...invidiousTorCustomRedirects,
|
||||||
|
|
||||||
...redirects.piped.normal,
|
...redirects.piped.normal,
|
||||||
...redirects.piped.tor,
|
...redirects.piped.tor,
|
||||||
...pipedNormalCustomRedirects,
|
...pipedNormalCustomRedirects,
|
||||||
...pipedTorCustomRedirects
|
...pipedTorCustomRedirects
|
||||||
].includes(initiator.origin)
|
].includes(initiator.origin)
|
||||||
)
|
)
|
||||||
) return 'BYPASSTAB';
|
) return 'BYPASSTAB';
|
||||||
@ -192,19 +155,32 @@ function redirect(url, details, initiator) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function reverse(url) {
|
function reverse(url) {
|
||||||
let protocolHost = commonHelper.protocolHost(url);
|
browser.storage.local.get(
|
||||||
if (![
|
[
|
||||||
...redirects.invidious.normal,
|
"youtubeRedirects",
|
||||||
...redirects.invidious.tor,
|
"invidiousNormalCustomRedirects",
|
||||||
...invidiousNormalCustomRedirects,
|
"invidiousTorCustomRedirects",
|
||||||
...invidiousTorCustomRedirects,
|
"pipedNormalCustomRedirects",
|
||||||
...redirects.piped.normal,
|
"pipedTorCustomRedirects",
|
||||||
...redirects.piped.tor,
|
],
|
||||||
...pipedNormalCustomRedirects,
|
r => {
|
||||||
...pipedTorCustomRedirects,
|
let protocolHost = commonHelper.protocolHost(url);
|
||||||
].includes(protocolHost)) return;
|
if (![
|
||||||
|
...r.youtubeRedirects.invidious.normal,
|
||||||
|
...r.youtubeRedirects.invidious.tor,
|
||||||
|
|
||||||
return `https://youtube.com${url.pathname}${url.search}`;
|
...r.youtubeRedirects.piped.normal,
|
||||||
|
...r.youtubeRedirects.piped.tor,
|
||||||
|
|
||||||
|
...r.invidiousNormalCustomRedirects,
|
||||||
|
...r.invidiousTorCustomRedirects,
|
||||||
|
|
||||||
|
...r.pipedNormalCustomRedirects,
|
||||||
|
...r.pipedTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) return;
|
||||||
|
|
||||||
|
return `https://youtube.com${url.pathname}${url.search}`;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchInstance(url) {
|
function switchInstance(url) {
|
||||||
@ -351,13 +327,10 @@ async function initDefaults() {
|
|||||||
pipedMaterialTorRedirectsChecks: [...redirects.pipedMaterial.tor],
|
pipedMaterialTorRedirectsChecks: [...redirects.pipedMaterial.tor],
|
||||||
pipedMaterialTorCustomRedirects: [],
|
pipedMaterialTorCustomRedirects: [],
|
||||||
|
|
||||||
alwaysUsePreferred: false,
|
|
||||||
youtubeEmbedFrontend: 'invidious',
|
youtubeEmbedFrontend: 'invidious',
|
||||||
youtubeProtocol: 'normal',
|
youtubeProtocol: 'normal',
|
||||||
bypassWatchOnYoutube: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
await invidious.initDefaults();
|
|
||||||
await piped.initDefaults();
|
await piped.initDefaults();
|
||||||
await pipedMaterial.initDefaults();
|
await pipedMaterial.initDefaults();
|
||||||
resolve();
|
resolve();
|
||||||
@ -394,10 +367,8 @@ async function init() {
|
|||||||
"pipedMaterialTorRedirectsChecks",
|
"pipedMaterialTorRedirectsChecks",
|
||||||
"pipedMaterialTorCustomRedirects",
|
"pipedMaterialTorCustomRedirects",
|
||||||
|
|
||||||
"alwaysUsePreferred",
|
|
||||||
"youtubeEmbedFrontend",
|
"youtubeEmbedFrontend",
|
||||||
"youtubeProtocol",
|
"youtubeProtocol",
|
||||||
"bypassWatchOnYoutube",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
redirects = r.youtubeRedirects;
|
redirects = r.youtubeRedirects;
|
||||||
@ -426,18 +397,46 @@ async function init() {
|
|||||||
|
|
||||||
youtubeEmbedFrontend = r.youtubeEmbedFrontend;
|
youtubeEmbedFrontend = r.youtubeEmbedFrontend;
|
||||||
OnlyEmbeddedVideo = r.OnlyEmbeddedVideo;
|
OnlyEmbeddedVideo = r.OnlyEmbeddedVideo;
|
||||||
alwaysUsePreferred = r.alwaysUsePreferred;
|
|
||||||
bypassWatchOnYoutube = r.bypassWatchOnYoutube;
|
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function initInvidiousCookies(from) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
browser.storage.local.get(
|
||||||
|
[
|
||||||
|
"youtubeProtocol",
|
||||||
|
"invidiousNormalRedirectsChecks",
|
||||||
|
"invidiousNormalCustomRedirects",
|
||||||
|
"invidiousTorRedirectsChecks",
|
||||||
|
"invidiousTorCustomRedirects",
|
||||||
|
],
|
||||||
|
r => {
|
||||||
|
let protocolHost = commonHelper.protocolHost(from);
|
||||||
|
if (![
|
||||||
|
...r.invidiousNormalRedirectsChecks,
|
||||||
|
...r.invidiousTorRedirectsChecks,
|
||||||
|
...r.invidiousNormalCustomRedirects,
|
||||||
|
...r.invidiousTorCustomRedirects,
|
||||||
|
].includes(protocolHost)) resolve();
|
||||||
|
let checkedInstances;
|
||||||
|
if (r.youtubeProtocol == 'normal') checkedInstances = [...r.invidiousNormalRedirectsChecks, ...r.invidiousNormalCustomRedirects]
|
||||||
|
else if (r.youtubeProtocol == 'tor') checkedInstances = [...r.invidiousTorRedirectsChecks, ...r.invidiousTorCustomRedirects]
|
||||||
|
for (const to of checkedInstances)
|
||||||
|
commonHelper.copyCookie('invidious', from, to, 'PREFS');
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
let
|
let
|
||||||
initPipedLocalStorage = piped.initPipedLocalStorage,
|
initPipedLocalStorage = piped.initPipedLocalStorage,
|
||||||
initPipedMaterialLocalStorage = pipedMaterial.initPipedMaterialLocalStorage,
|
initPipedMaterialLocalStorage = pipedMaterial.initPipedMaterialLocalStorage,
|
||||||
initInvidiousCookies = invidious.initInvidiousCookies;
|
copyPipedLocalStorage = piped.copyPipedLocalStorage;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
initPipedLocalStorage,
|
initPipedLocalStorage,
|
||||||
@ -452,6 +451,8 @@ export default {
|
|||||||
|
|
||||||
isPipedorInvidious,
|
isPipedorInvidious,
|
||||||
|
|
||||||
|
copyPipedLocalStorage,
|
||||||
|
|
||||||
initDefaults,
|
initDefaults,
|
||||||
|
|
||||||
init,
|
init,
|
||||||
|
@ -28,7 +28,6 @@ function isYoutubeMusic(url, initiator) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function redirect(url, type) {
|
function redirect(url, type) {
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
// https://music.youtube.com/watch?v=_PkGiKBW-DA&list=RDAMVM_PkGiKBW-DA
|
// https://music.youtube.com/watch?v=_PkGiKBW-DA&list=RDAMVM_PkGiKBW-DA
|
||||||
// https://beatbump.ml/listen?id=_PkGiKBW-DA&list=RDAMVM_PkGiKBW-DA
|
// https://beatbump.ml/listen?id=_PkGiKBW-DA&list=RDAMVM_PkGiKBW-DA
|
||||||
@ -69,7 +68,6 @@ function redirect(url, type) {
|
|||||||
async function initDefaults() {
|
async function initDefaults() {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableYoutubeMusic: true,
|
disableYoutubeMusic: true,
|
||||||
|
|
||||||
youtubeMusicRedirects: redirects,
|
youtubeMusicRedirects: redirects,
|
||||||
|
|
||||||
beatbumpNormalRedirectsChecks: [...redirects.beatbump.normal],
|
beatbumpNormalRedirectsChecks: [...redirects.beatbump.normal],
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
"https://piped.moomoo.me",
|
"https://piped.moomoo.me",
|
||||||
"https://piped.syncpundit.com",
|
"https://piped.syncpundit.com",
|
||||||
"https://piped.mha.fi",
|
"https://piped.mha.fi",
|
||||||
"https://piped.shimul.me/",
|
|
||||||
"https://send.silkky.cloud",
|
"https://send.silkky.cloud",
|
||||||
"https://nhanh.cloud",
|
"https://nhanh.cloud",
|
||||||
"https://nitter.domain.glass",
|
"https://nitter.domain.glass",
|
||||||
|
@ -40,10 +40,9 @@
|
|||||||
"https://il.ax",
|
"https://il.ax",
|
||||||
"https://piped.syncpundit.com",
|
"https://piped.syncpundit.com",
|
||||||
"https://piped.mha.fi",
|
"https://piped.mha.fi",
|
||||||
"https://piped.shimul.me/",
|
"https://piped.shimul.me",
|
||||||
"https://piped.mint.lgbt",
|
"https://piped.mint.lgbt",
|
||||||
"https://piped.privacy.com.de",
|
"https://piped.privacy.com.de"
|
||||||
"https://piped.notyourcomputer.net"
|
|
||||||
],
|
],
|
||||||
"tor": [
|
"tor": [
|
||||||
"http://piped2bbch4xslbl2ckr6k62q56kon56ffowxaqzy42ai22a4sash3ad.onion"
|
"http://piped2bbch4xslbl2ckr6k62q56kon56ffowxaqzy42ai22a4sash3ad.onion"
|
||||||
@ -358,7 +357,6 @@
|
|||||||
"https://search.disroot.org",
|
"https://search.disroot.org",
|
||||||
"https://search.ethibox.fr",
|
"https://search.ethibox.fr",
|
||||||
"https://search.jpope.org",
|
"https://search.jpope.org",
|
||||||
"https://search.ononoki.org",
|
|
||||||
"https://search.snopyta.org",
|
"https://search.snopyta.org",
|
||||||
"https://search.stinpriza.org",
|
"https://search.stinpriza.org",
|
||||||
"https://search.trom.tf",
|
"https://search.trom.tf",
|
||||||
@ -367,6 +365,7 @@
|
|||||||
"https://searx.dresden.network",
|
"https://searx.dresden.network",
|
||||||
"https://searx.fossencdi.org",
|
"https://searx.fossencdi.org",
|
||||||
"https://searx.gnu.style",
|
"https://searx.gnu.style",
|
||||||
|
"https://searx.jaska.cc",
|
||||||
"https://searx.josie.lol",
|
"https://searx.josie.lol",
|
||||||
"https://searx.kujonello.cf",
|
"https://searx.kujonello.cf",
|
||||||
"https://searx.mxchange.org",
|
"https://searx.mxchange.org",
|
||||||
@ -377,6 +376,7 @@
|
|||||||
"https://searx.nixnet.services",
|
"https://searx.nixnet.services",
|
||||||
"https://searx.openhoofd.nl",
|
"https://searx.openhoofd.nl",
|
||||||
"https://searx.org",
|
"https://searx.org",
|
||||||
|
"https://searx.ppeb.me",
|
||||||
"https://searx.pwoss.org",
|
"https://searx.pwoss.org",
|
||||||
"https://searx.rasp.fr",
|
"https://searx.rasp.fr",
|
||||||
"https://searx.ru",
|
"https://searx.ru",
|
||||||
@ -427,6 +427,7 @@
|
|||||||
"https://search.bus-hit.me",
|
"https://search.bus-hit.me",
|
||||||
"https://search.mdosch.de",
|
"https://search.mdosch.de",
|
||||||
"https://search.neet.works",
|
"https://search.neet.works",
|
||||||
|
"https://search.ononoki.org",
|
||||||
"https://search.privacyguides.net",
|
"https://search.privacyguides.net",
|
||||||
"https://search.rabbit-company.com",
|
"https://search.rabbit-company.com",
|
||||||
"https://search.roombob.cat",
|
"https://search.roombob.cat",
|
||||||
@ -439,12 +440,12 @@
|
|||||||
"https://searx.esmailelbob.xyz",
|
"https://searx.esmailelbob.xyz",
|
||||||
"https://searx.fmac.xyz",
|
"https://searx.fmac.xyz",
|
||||||
"https://searx.gnous.eu",
|
"https://searx.gnous.eu",
|
||||||
"https://searx.jaska.cc",
|
|
||||||
"https://searx.loafland.xyz",
|
"https://searx.loafland.xyz",
|
||||||
"https://searx.mha.fi",
|
"https://searx.mha.fi",
|
||||||
"https://searx.namejeff.xyz",
|
"https://searx.namejeff.xyz",
|
||||||
"https://searx.orion-hub.fr",
|
"https://searx.orion-hub.fr",
|
||||||
"https://searx.prvcy.eu",
|
"https://searx.prvcy.eu",
|
||||||
|
"https://searx.sev.monster",
|
||||||
"https://searx.tiekoetter.com",
|
"https://searx.tiekoetter.com",
|
||||||
"https://searxng.zackptg5.com",
|
"https://searxng.zackptg5.com",
|
||||||
"https://www.webrats.xyz"
|
"https://www.webrats.xyz"
|
||||||
@ -490,6 +491,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"peertube": [
|
"peertube": [
|
||||||
|
"https://peertube.io",
|
||||||
"https://peertube.echelon4.space",
|
"https://peertube.echelon4.space",
|
||||||
"https://dalek.zone",
|
"https://dalek.zone",
|
||||||
"https://www.kotikoff.net",
|
"https://www.kotikoff.net",
|
||||||
@ -507,7 +509,6 @@
|
|||||||
"https://pt.k2s.sk",
|
"https://pt.k2s.sk",
|
||||||
"https://video.xonumi.com",
|
"https://video.xonumi.com",
|
||||||
"https://gameplay.wtf",
|
"https://gameplay.wtf",
|
||||||
"https://video.espr.moe",
|
|
||||||
"https://peertube.louis.software",
|
"https://peertube.louis.software",
|
||||||
"https://tube.zrx.one",
|
"https://tube.zrx.one",
|
||||||
"https://video.cats-home.net",
|
"https://video.cats-home.net",
|
||||||
@ -556,7 +557,6 @@
|
|||||||
"https://media.zat.im",
|
"https://media.zat.im",
|
||||||
"https://videos.sadx.moe",
|
"https://videos.sadx.moe",
|
||||||
"https://pt.nospy.net",
|
"https://pt.nospy.net",
|
||||||
"https://peertube.thele.me",
|
|
||||||
"https://yhwh.tube",
|
"https://yhwh.tube",
|
||||||
"https://tube.zee.li",
|
"https://tube.zee.li",
|
||||||
"https://peerlook.ru",
|
"https://peerlook.ru",
|
||||||
@ -856,7 +856,6 @@
|
|||||||
"https://media.fsfe.org",
|
"https://media.fsfe.org",
|
||||||
"https://flytandemeistring.space",
|
"https://flytandemeistring.space",
|
||||||
"https://xn--modervr-jxa.space",
|
"https://xn--modervr-jxa.space",
|
||||||
"https://watch.daspr.io",
|
|
||||||
"https://video.windfluechter.org",
|
"https://video.windfluechter.org",
|
||||||
"https://pocketnetpeertube10.nohost.me",
|
"https://pocketnetpeertube10.nohost.me",
|
||||||
"https://tube.io18.top",
|
"https://tube.io18.top",
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
"https://piped.mha.fi",
|
"https://piped.mha.fi",
|
||||||
"https://piped.shimul.me",
|
"https://piped.shimul.me",
|
||||||
"https://piped.mint.lgbt",
|
"https://piped.mint.lgbt",
|
||||||
"https://piped.privacy.com.de",
|
"https://piped.privacy.com.de"
|
||||||
"https://piped.notyourcomputer.net"
|
|
||||||
],
|
],
|
||||||
"tor": [
|
"tor": [
|
||||||
"http://piped2bbch4xslbl2ckr6k62q56kon56ffowxaqzy42ai22a4sash3ad.onion"
|
"http://piped2bbch4xslbl2ckr6k62q56kon56ffowxaqzy42ai22a4sash3ad.onion"
|
||||||
|
@ -93,29 +93,17 @@ browser.webRequest.onBeforeRequest.addListener(
|
|||||||
if (youtubeMusicHelper.isYoutubeMusic(url, initiator)) newUrl = youtubeMusicHelper.redirect(url, details.type)
|
if (youtubeMusicHelper.isYoutubeMusic(url, initiator)) newUrl = youtubeMusicHelper.redirect(url, details.type)
|
||||||
|
|
||||||
if (!newUrl) newUrl = twitterHelper.redirect(url, initiator);
|
if (!newUrl) newUrl = twitterHelper.redirect(url, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = instagramHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = instagramHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = await mapsHelper.redirect(url, initiator);
|
if (!newUrl) newUrl = await mapsHelper.redirect(url, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = redditHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = redditHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = mediumHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = mediumHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = imgurHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = imgurHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = tiktokHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = tiktokHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = sendTargetsHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = sendTargetsHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = peertubeHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = peertubeHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = lbryHelper.redirect(url, details.type, initiator);
|
if (!newUrl) newUrl = lbryHelper.redirect(url, details.type, initiator);
|
||||||
|
|
||||||
if (!newUrl) newUrl = translateHelper.redirect(url);
|
if (!newUrl) newUrl = translateHelper.redirect(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = searchHelper.redirect(url)
|
if (!newUrl) newUrl = searchHelper.redirect(url)
|
||||||
|
|
||||||
if (!newUrl) newUrl = wikipediaHelper.redirect(url);
|
if (!newUrl) newUrl = wikipediaHelper.redirect(url);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -198,7 +186,6 @@ browser.webRequest.onResponseStarted.addListener(
|
|||||||
details => {
|
details => {
|
||||||
if (!generalHelper.getAutoRedirect()) return null;
|
if (!generalHelper.getAutoRedirect()) return null;
|
||||||
|
|
||||||
console.log('details.statusCode', details.statusCode);
|
|
||||||
if (details.type == 'main_frame' && (details.statusCode == 502 || details.statusCode == 503 || details.statusCode == 504)) {
|
if (details.type == 'main_frame' && (details.statusCode == 502 || details.statusCode == 503 || details.statusCode == 504)) {
|
||||||
// if (details.type == 'main_frame' && details.statusCode >= 200) {
|
// if (details.type == 'main_frame' && details.statusCode >= 200) {
|
||||||
// console.log("statusCode", details.statusCode);
|
// console.log("statusCode", details.statusCode);
|
||||||
@ -226,10 +213,10 @@ browser.tabs.onUpdated.addListener(
|
|||||||
let url;
|
let url;
|
||||||
try { url = new URL(changeInfo.url); }
|
try { url = new URL(changeInfo.url); }
|
||||||
catch (_) { return }
|
catch (_) { return }
|
||||||
if (youtubeHelper.isPipedorInvidious(url, 'main_frame', 'piped')) youtubeHelper.initPipedLocalStorage(tabId);
|
let result = await youtubeHelper.initPipedLocalStorage(url, tabId);
|
||||||
if (youtubeHelper.isPipedorInvidious(url, 'main_frame', 'pipedMaterial')) youtubeHelper.initPipedMaterialLocalStorage(tabId);
|
// if (youtubeHelper.isPipedorInvidious(url, 'main_frame', 'pipedMaterial')) youtubeHelper.initPipedMaterialLocalStorage(tabId);
|
||||||
if (translateHelper.isTranslateRedirects(url, 'main_frame', 'lingva')) translateHelper.initLingvaLocalStorage(tabId);
|
// if (translateHelper.isTranslateRedirects(url, 'main_frame', 'lingva')) translateHelper.initLingvaLocalStorage(tabId);
|
||||||
if (instagramHelper.isBibliogram(url)) instagramHelper.initBibliogramCookies(url);
|
// if (instagramHelper.isBibliogram(url)) instagramHelper.initBibliogramCookies(url);
|
||||||
// if (changeInfo.url && youtubeHelper.isPipedorInvidious(url, 'main_frame', 'pipedMaterial')) youtubeHelper.initPipedMaterialLocalStorage(tabId);
|
// if (changeInfo.url && youtubeHelper.isPipedorInvidious(url, 'main_frame', 'pipedMaterial')) youtubeHelper.initPipedMaterialLocalStorage(tabId);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -237,27 +224,16 @@ browser.tabs.onUpdated.addListener(
|
|||||||
async function changeWholeInstance(url) {
|
async function changeWholeInstance(url) {
|
||||||
await wholeInit();
|
await wholeInit();
|
||||||
let newUrl = youtubeHelper.switchInstance(url);
|
let newUrl = youtubeHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = twitterHelper.switchInstance(url);
|
if (!newUrl) newUrl = twitterHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = instagramHelper.switchInstance(url);
|
if (!newUrl) newUrl = instagramHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = redditHelper.switchInstance(url);
|
if (!newUrl) newUrl = redditHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = searchHelper.switchInstance(url);
|
if (!newUrl) newUrl = searchHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = translateHelper.switchInstance(url);
|
if (!newUrl) newUrl = translateHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = mediumHelper.switchInstance(url);
|
if (!newUrl) newUrl = mediumHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = sendTargetsHelper.switchInstance(url);
|
if (!newUrl) newUrl = sendTargetsHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = peertubeHelper.switchInstance(url);
|
if (!newUrl) newUrl = peertubeHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = imgurHelper.switchInstance(url);
|
if (!newUrl) newUrl = imgurHelper.switchInstance(url);
|
||||||
|
|
||||||
if (!newUrl) newUrl = wikipediaHelper.switchInstance(url);
|
if (!newUrl) newUrl = wikipediaHelper.switchInstance(url);
|
||||||
|
|
||||||
return newUrl;
|
return newUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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 class="selected" href="../general/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a class="selected" href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -24,33 +24,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
@ -62,14 +62,6 @@
|
|||||||
<option value="dark" data-localise="__MSG_dark__">Dark</option>
|
<option value="dark" data-localise="__MSG_dark__">Dark</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_applyTheme__">Apply Theme to sites</h4>
|
|
||||||
<input id="apply-theme-to-sites" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_alwaysPref__">Always use Preferred Instances</h4>
|
|
||||||
<input id="always-use-preferred" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4 data-localise="__MSG_autoRedirect__">Auto Redirect of offline instances</h4>
|
<h4 data-localise="__MSG_autoRedirect__">Auto Redirect of offline instances</h4>
|
||||||
<input id="auto-redirect" type="checkbox">
|
<input id="auto-redirect" type="checkbox">
|
||||||
|
@ -57,20 +57,10 @@ resetSettingsElement.addEventListener("click",
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
let alwaysUsePreferredElement = document.getElementById("always-use-preferred")
|
|
||||||
alwaysUsePreferredElement.addEventListener("change",
|
|
||||||
event => generalHelper.setAlwaysUsePreferred(event.target.checked)
|
|
||||||
);
|
|
||||||
|
|
||||||
let autoRedirectElement = document.getElementById("auto-redirect")
|
let autoRedirectElement = document.getElementById("auto-redirect")
|
||||||
autoRedirectElement.addEventListener("change",
|
autoRedirectElement.addEventListener("change",
|
||||||
event => generalHelper.setAutoRedirect(event.target.checked)
|
event => generalHelper.setAutoRedirect(event.target.checked)
|
||||||
);
|
);
|
||||||
|
|
||||||
let applyThemeToSitesElement = document.getElementById("apply-theme-to-sites")
|
|
||||||
applyThemeToSitesElement.addEventListener("change",
|
|
||||||
event => generalHelper.setApplyThemeToSites(event.target.checked)
|
|
||||||
);
|
|
||||||
let themeElement = document.getElementById("theme");
|
let themeElement = document.getElementById("theme");
|
||||||
themeElement.addEventListener("change", event => {
|
themeElement.addEventListener("change", event => {
|
||||||
const value = event.target.options[theme.selectedIndex].value;
|
const value = event.target.options[theme.selectedIndex].value;
|
||||||
@ -96,10 +86,8 @@ for (const frontend of generalHelper.allPopupFrontends)
|
|||||||
)
|
)
|
||||||
|
|
||||||
generalHelper.init().then(() => {
|
generalHelper.init().then(() => {
|
||||||
alwaysUsePreferredElement.checked = generalHelper.getAlwaysUsePreferred();
|
|
||||||
autoRedirectElement.checked = generalHelper.getAutoRedirect();
|
autoRedirectElement.checked = generalHelper.getAutoRedirect();
|
||||||
themeElement.value = generalHelper.getTheme();
|
themeElement.value = generalHelper.getTheme();
|
||||||
applyThemeToSitesElement.checked = generalHelper.getApplyThemeToSites();
|
|
||||||
instanceTypeElement.addEventListener("change",
|
instanceTypeElement.addEventListener("change",
|
||||||
event => {
|
event => {
|
||||||
instanceType = event.target.options[instanceTypeElement.selectedIndex].value
|
instanceType = event.target.options[instanceTypeElement.selectedIndex].value
|
||||||
@ -117,13 +105,14 @@ generalHelper.init().then(() => {
|
|||||||
function calcExceptionsCustomInstances() {
|
function calcExceptionsCustomInstances() {
|
||||||
document.getElementById("exceptions-custom-checklist").innerHTML =
|
document.getElementById("exceptions-custom-checklist").innerHTML =
|
||||||
[...exceptionsCustomInstances.url, ...exceptionsCustomInstances.regex].map(
|
[...exceptionsCustomInstances.url, ...exceptionsCustomInstances.regex].map(
|
||||||
(x) => `<div>${x}<button class="add" id="clear-${x}">
|
(x) => `<div>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
|
${x}
|
||||||
fill="currentColor">
|
<button class="add" id="clear-${x}">
|
||||||
<path d="M0 0h24v24H0V0z" fill="none" />
|
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
|
||||||
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
|
fill="currentColor">
|
||||||
</svg>
|
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
|
||||||
</button>
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<hr>`
|
<hr>`
|
||||||
).join('\n');
|
).join('\n');
|
||||||
|
@ -14,14 +14,6 @@ body.option(dir="auto")
|
|||||||
option(value="light" data-localise="__MSG_light__") Light
|
option(value="light" data-localise="__MSG_light__") Light
|
||||||
option(value="dark" data-localise="__MSG_dark__") Dark
|
option(value="dark" data-localise="__MSG_dark__") Dark
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_applyTheme__") Apply Theme to sites
|
|
||||||
input#apply-theme-to-sites(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_alwaysPref__") Always use Preferred Instances
|
|
||||||
input#always-use-preferred(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
.some-block.option-block
|
||||||
h4(data-localise="__MSG_autoRedirect__") Auto Redirect of offline instances
|
h4(data-localise="__MSG_autoRedirect__") Auto Redirect of offline instances
|
||||||
input#auto-redirect(type="checkbox")
|
input#auto-redirect(type="checkbox")
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a class="selected" href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a class="selected" href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
import instagramHelper from "../../../assets/javascripts/helpers/instagram.js";
|
import instagramHelper from "../../../assets/javascripts/helpers/instagram.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableInstagramElement = document.getElementById("disable-bibliogram");
|
const disable = document.getElementById("disable-bibliogram");
|
||||||
let protocolElement = document.getElementById("protocol");
|
const protocol = document.getElementById("protocol");
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableInstagram: disableInstagramElement.checked,
|
disableInstagram: disable.checked,
|
||||||
instagramProtocol: protocolElement.value,
|
instagramProtocol: protocol.value,
|
||||||
})
|
})
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeProtocolSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalDiv = document.getElementsByClassName("normal")[0];
|
let normalDiv = document.getElementsByClassName("normal")[0];
|
||||||
let torDiv = document.getElementsByClassName("tor")[0];
|
let torDiv = document.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalDiv.style.display = 'block';
|
normalDiv.style.display = 'block';
|
||||||
torDiv.style.display = 'none';
|
torDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
@ -31,11 +31,9 @@ browser.storage.local.get(
|
|||||||
"instagramProtocol"
|
"instagramProtocol"
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableInstagramElement.checked = !r.disableInstagram;
|
disable.checked = !r.disableInstagram;
|
||||||
|
protocol.value = r.instagramProtocol;
|
||||||
let protocol = r.instagramProtocol;
|
changeProtocolSettings();
|
||||||
protocolElement.value = protocol;
|
|
||||||
changeProtocolSettings(protocol);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
commonHelper.processDefaultCustomInstances('instagram', 'bibliogram', 'normal', document);
|
commonHelper.processDefaultCustomInstances('instagram', 'bibliogram', 'normal', document);
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a class="selected" href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a class="selected" href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
import lbryHelper from "../../../assets/javascripts/helpers/lbry.js";
|
import lbryHelper from "../../../assets/javascripts/helpers/lbry.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableLbryElement = document.getElementById("disable-lbry");
|
let disable = document.getElementById("disable-lbry");
|
||||||
let protocolElement = document.getElementById("protocol")
|
let protocol = document.getElementById("protocol")
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableLbryTargets: !lbryHelper.checked,
|
disableLbryTargets: !lbryHelper.checked,
|
||||||
lbryTargetsProtocol: protocolElement.value,
|
lbryTargetsProtocol: protocol.value,
|
||||||
});
|
});
|
||||||
changeProtocolSettings(protocolElement.value)
|
changeProtocolSettings()
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalDiv = document.getElementsByClassName("normal")[0];
|
let normalDiv = document.getElementsByClassName("normal")[0];
|
||||||
let torDiv = document.getElementsByClassName("tor")[0];
|
let torDiv = document.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalDiv.style.display = 'block';
|
normalDiv.style.display = 'block';
|
||||||
torDiv.style.display = 'none';
|
torDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
@ -31,14 +31,14 @@ browser.storage.local.get(
|
|||||||
"lbryTargetsProtocol"
|
"lbryTargetsProtocol"
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableLbryElement.checked = !r.disableLbryTargets;
|
disable.checked = !r.disableLbryTargets;
|
||||||
|
protocol.value = r.lbryTargetsProtocol;
|
||||||
|
changeProtocolSettings();
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
let protocol = r.lbryTargetsProtocol;
|
commonHelper.processDefaultCustomInstances('lbryTargets', 'librarian', 'normal', document);
|
||||||
protocolElement.value = protocol;
|
commonHelper.processDefaultCustomInstances('lbryTargets', 'librarian', 'tor', document);
|
||||||
changeProtocolSettings(protocol);
|
|
||||||
})
|
|
||||||
commonHelper.processDefaultCustomInstances('lbry', 'librarian', 'normal', document);
|
|
||||||
commonHelper.processDefaultCustomInstances('lbry', 'librarian', 'tor', document);
|
|
||||||
|
|
||||||
let latencyElement = document.getElementById("latency");
|
let latencyElement = document.getElementById("latency");
|
||||||
let latencyLabel = document.getElementById("latency-label");
|
let latencyLabel = document.getElementById("latency-label");
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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 class="selected" href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a class="selected" href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,35 +1,32 @@
|
|||||||
import mapsHelper from "../../../assets/javascripts/helpers/maps.js";
|
import mapsHelper from "../../../assets/javascripts/helpers/maps.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableMapsElement = document.getElementById("disable-osm");
|
const disable = document.getElementById("disable-osm");
|
||||||
let mapsFrontendElement = document.getElementById("maps-frontend");
|
const frontend = document.getElementById("maps-frontend");
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableMaps: !disableMapsElement.checked,
|
disableMaps: !disable.checked,
|
||||||
mapsFrontend: mapsFrontendElement.value,
|
mapsFrontend: frontend.value,
|
||||||
})
|
})
|
||||||
changeFrontendsSettings(mapsFrontendElement.value);
|
changeFrontendsSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
let facilDivElement = document.getElementById("facil")
|
const facilDiv = document.getElementById("facil")
|
||||||
function changeFrontendsSettings(frontend) {
|
function changeFrontendsSettings() {
|
||||||
if (frontend == 'facil') {
|
if (frontend.value == 'facil') facilDiv.style.display = 'block';
|
||||||
facilDivElement.style.display = 'block';
|
else if (frontend.value == 'osm') facilDiv.style.display = 'none';
|
||||||
}
|
|
||||||
else if (frontend == 'osm') {
|
|
||||||
facilDivElement.style.display = 'none';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disableMaps",
|
"disableMaps",
|
||||||
"mapsFrontend",
|
"mapsFrontend",
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableMapsElement.checked = !r.disableMaps;
|
disable.checked = !r.disableMaps;
|
||||||
mapsFrontendElement.value = r.mapsFrontend;
|
frontend.value = r.mapsFrontend;
|
||||||
changeFrontendsSettings(r.mapsFrontend);
|
changeFrontendsSettings();
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
commonHelper.processDefaultCustomInstances('maps', 'facil', 'normal', document);
|
commonHelper.processDefaultCustomInstances('maps', 'facil', 'normal', document);
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a class="selected" href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a class="selected" href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import mediumHelper from "../../../assets/javascripts/helpers/medium.js";
|
import mediumHelper from "../../../assets/javascripts/helpers/medium.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableMediumElement = document.getElementById("disable-medium");
|
let disable = document.getElementById("disable-medium");
|
||||||
let protocolElement = document.getElementById("protocol")
|
let protocol = document.getElementById("protocol")
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
@ -10,11 +10,9 @@ browser.storage.local.get(
|
|||||||
"mediumProtocol"
|
"mediumProtocol"
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableMediumElement.checked = !r.disableMedium;
|
disable.checked = !r.disableMedium;
|
||||||
|
protocol.value = r.mediumProtocol;
|
||||||
let protocol = r.mediumProtocol;
|
changeProtocolSettings();
|
||||||
protocolElement.value = protocol;
|
|
||||||
changeProtocolSettings(protocol);
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
commonHelper.processDefaultCustomInstances('medium', 'scribe', 'normal', document);
|
commonHelper.processDefaultCustomInstances('medium', 'scribe', 'normal', document);
|
||||||
@ -22,20 +20,20 @@ commonHelper.processDefaultCustomInstances('medium', 'scribe', 'tor', document);
|
|||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableMedium: !disableMediumElement.checked,
|
disableMedium: !disable.checked,
|
||||||
mediumProtocol: protocolElement.value,
|
mediumProtocol: protocol.value,
|
||||||
})
|
})
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeProtocolSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalDiv = document.getElementsByClassName("normal")[0];
|
let normalDiv = document.getElementsByClassName("normal")[0];
|
||||||
let torDiv = document.getElementsByClassName("tor")[0];
|
let torDiv = document.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalDiv.style.display = 'block';
|
normalDiv.style.display = 'block';
|
||||||
torDiv.style.display = 'none';
|
torDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a class="selected" href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a class="selected" href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
import peertubeHelper from "../../../assets/javascripts/helpers/peertube.js";
|
import peertubeHelper from "../../../assets/javascripts/helpers/peertube.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disablePeertubeElement = document.getElementById("disable-peertube");
|
let disable = document.getElementById("disable-peertube");
|
||||||
let protocolElement = document.getElementById("protocol")
|
let protocol = document.getElementById("protocol")
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disablePeertubeTargets",
|
"disablePeertubeTargets",
|
||||||
"peertubeTargetsProtocol"
|
"peertubeTargetsProtocol"
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disablePeertubeElement.checked = !r.disablePeertubeTargets;
|
disable.checked = !r.disablePeertubeTargets;
|
||||||
|
protocol.value = r.peertubeTargetsProtocol;
|
||||||
let protocol = r.peertubeTargetsProtocol;
|
changeProtocolSettings();
|
||||||
protocolElement.value = protocol;
|
|
||||||
changeProtocolSettings(protocol);
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
commonHelper.processDefaultCustomInstances('peertube', 'simpleertube', 'normal', document);
|
commonHelper.processDefaultCustomInstances('peertube', 'simpleertube', 'normal', document);
|
||||||
@ -21,20 +19,20 @@ commonHelper.processDefaultCustomInstances('peertube', 'simpleertube', 'tor', do
|
|||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disablePeertubeTargets: !disablePeertubeElement.checked,
|
disablePeertubeTargets: !disable.checked,
|
||||||
peertubeTargetsProtocol: protocolElement.value
|
peertubeTargetsProtocol: protocol.value
|
||||||
})
|
})
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeProtocolSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalDiv = document.getElementsByClassName("normal")[0];
|
const normalDiv = document.getElementsByClassName("normal")[0];
|
||||||
let torDiv = document.getElementsByClassName("tor")[0];
|
const torDiv = document.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalDiv.style.display = 'block';
|
normalDiv.style.display = 'block';
|
||||||
torDiv.style.display = 'none';
|
torDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
@ -73,26 +73,7 @@
|
|||||||
<option value="tor" data-localise="__MSG_tor__">Tor</option>
|
<option value="tor" data-localise="__MSG_tor__">Tor</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_bypassReddit__">Bypass "Open in Reddit"</h4>
|
|
||||||
<input id="bypass-watch-on-reddit" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div id="libreddit">
|
<div id="libreddit">
|
||||||
<hr>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4>Unify cookies across selected instances</h4>
|
|
||||||
</div>
|
|
||||||
<form>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<input type="url" placeholder="https://libreddit.com">
|
|
||||||
<button class="add" type="submit">
|
|
||||||
<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">
|
|
||||||
<rect fill="none" height="24" width="24"></rect>
|
|
||||||
<path d="M18,2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M18,16H9V4h9V16z M3,15v-2h2v2H3z M3,9.5h2v2H3V9.5z M10,20h2v2h-2V20z M3,18.5v-2h2v2H3z M5,22c-1.1,0-2-0.9-2-2h2V22z M8.5,22h-2v-2h2V22z M13.5,22L13.5,22l0-2h2 v0C15.5,21.1,14.6,22,13.5,22z M5,6L5,6l0,2H3v0C3,6.9,3.9,6,5,6z"></path>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="normal">
|
<div class="normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
|
@ -5,19 +5,17 @@ let libredditDivElement = document.getElementById("libreddit")
|
|||||||
let tedditDivElement = document.getElementById("teddit")
|
let tedditDivElement = document.getElementById("teddit")
|
||||||
|
|
||||||
let disableRedditElement = document.getElementById("disable-reddit");
|
let disableRedditElement = document.getElementById("disable-reddit");
|
||||||
let redditFrontendElement = document.getElementById("reddit-frontend");
|
let frontend = document.getElementById("reddit-frontend");
|
||||||
let protocolElement = document.getElementById("protocol")
|
let protocol = document.getElementById("protocol")
|
||||||
let bypassWatchOnRedditElement = document.getElementById("bypass-watch-on-reddit")
|
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", () => {
|
||||||
await browser.storage.local.set({
|
browser.storage.local.set({
|
||||||
disableReddit: !disableRedditElement.checked,
|
disableReddit: !disableRedditElement.checked,
|
||||||
bypassWatchOnReddit: bypassWatchOnRedditElement.checked,
|
redditProtocol: protocol.value,
|
||||||
redditProtocol: protocolElement.value,
|
redditFrontend: frontend.value,
|
||||||
redditFrontend: redditFrontendElement.value,
|
|
||||||
});
|
});
|
||||||
changeFrontendsSettings(redditFrontendElement.value);
|
changeFrontendsSettings();
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeProtocolSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
const libredditForm = libredditDivElement.getElementsByTagName('form')[0];
|
const libredditForm = libredditDivElement.getElementsByTagName('form')[0];
|
||||||
@ -26,50 +24,49 @@ libredditForm.addEventListener('submit', async event => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const url = new URL(libredditCookies.value);
|
const url = new URL(libredditCookies.value);
|
||||||
redditHelper.initLibredditCookies(url);
|
redditHelper.initLibredditCookies(url);
|
||||||
})
|
});
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
const tedditForm = tedditDivElement.getElementsByTagName('form')[0];
|
||||||
|
const tedditCookies = tedditForm.getElementsByTagName('input')[0];
|
||||||
|
tedditForm.addEventListener('submit', async event => {
|
||||||
|
event.preventDefault();
|
||||||
|
const url = new URL(tedditCookies.value);
|
||||||
|
redditHelper.initTedditCookies(url);
|
||||||
|
});
|
||||||
|
|
||||||
|
function changeProtocolSettings() {
|
||||||
let normalLibredditDiv = libredditDivElement.getElementsByClassName("normal")[0];
|
let normalLibredditDiv = libredditDivElement.getElementsByClassName("normal")[0];
|
||||||
let torLibredditDiv = libredditDivElement.getElementsByClassName("tor")[0];
|
let torLibredditDiv = libredditDivElement.getElementsByClassName("tor")[0];
|
||||||
|
|
||||||
let normalTedditDiv = tedditDivElement.getElementsByClassName("normal")[0];
|
let normalTedditDiv = tedditDivElement.getElementsByClassName("normal")[0];
|
||||||
let torTedditDiv = tedditDivElement.getElementsByClassName("tor")[0];
|
let torTedditDiv = tedditDivElement.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalLibredditDiv.style.display = 'block';
|
normalLibredditDiv.style.display = 'block';
|
||||||
normalTedditDiv.style.display = 'block';
|
normalTedditDiv.style.display = 'block';
|
||||||
torTedditDiv.style.display = 'none';
|
torTedditDiv.style.display = 'none';
|
||||||
torLibredditDiv.style.display = 'none';
|
torLibredditDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalLibredditDiv.style.display = 'none';
|
normalLibredditDiv.style.display = 'none';
|
||||||
normalTedditDiv.style.display = 'none';
|
normalTedditDiv.style.display = 'none';
|
||||||
torTedditDiv.style.display = 'block';
|
torTedditDiv.style.display = 'block';
|
||||||
torLibredditDiv.style.display = 'block';
|
torLibredditDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function changeFrontendsSettings(frontend) {
|
function changeFrontendsSettings() {
|
||||||
let frontendElement = document.getElementById("frontend");
|
if (frontend.value == 'libreddit') {
|
||||||
if (frontend == 'libreddit') {
|
|
||||||
frontendElement.innerHTML = 'Frontend';
|
|
||||||
libredditDivElement.style.display = 'block';
|
libredditDivElement.style.display = 'block';
|
||||||
tedditDivElement.style.display = 'none';
|
tedditDivElement.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (frontend == 'teddit') {
|
else if (frontend.value == 'teddit') {
|
||||||
frontendElement.innerHTML = 'Frontend';
|
|
||||||
libredditDivElement.style.display = 'none';
|
libredditDivElement.style.display = 'none';
|
||||||
tedditDivElement.style.display = 'block';
|
tedditDivElement.style.display = 'block';
|
||||||
}
|
}
|
||||||
else if (frontend == 'old') {
|
|
||||||
frontendElement.innerHTML = `Frontend: <span style="color:red;">This isn't a fully private frontend</span>`;
|
|
||||||
libredditDivElement.style.display = 'none';
|
|
||||||
tedditDivElement.style.display = 'none';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disableReddit",
|
"disableReddit",
|
||||||
"bypassWatchOnReddit",
|
|
||||||
"redditProtocol",
|
"redditProtocol",
|
||||||
"redditFrontend",
|
"redditFrontend",
|
||||||
|
|
||||||
@ -77,11 +74,10 @@ browser.storage.local.get(
|
|||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableRedditElement.checked = !r.disableReddit
|
disableRedditElement.checked = !r.disableReddit
|
||||||
bypassWatchOnRedditElement.checked = r.bypassWatchOnReddit
|
protocol.value = r.redditProtocol
|
||||||
protocolElement.value = r.redditProtocol
|
frontend.value = r.redditFrontend
|
||||||
redditFrontendElement.value = r.redditFrontend
|
changeFrontendsSettings();
|
||||||
changeFrontendsSettings(r.redditFrontend);
|
changeProtocolSettings();
|
||||||
changeProtocolSettings(r.redditProtocol);
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -24,24 +24,8 @@ body.option(dir="auto")
|
|||||||
option(value="normal" data-localise="__MSG_normal__") Normal
|
option(value="normal" data-localise="__MSG_normal__") Normal
|
||||||
option(value="tor" data-localise="__MSG_tor__") Tor
|
option(value="tor" data-localise="__MSG_tor__") Tor
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_bypassReddit__") Bypass "Open in Reddit"
|
|
||||||
input#bypass-watch-on-reddit(type="checkbox")
|
|
||||||
|
|
||||||
#libreddit
|
#libreddit
|
||||||
hr
|
hr
|
||||||
.some-block.option-block
|
|
||||||
h4 Unify cookies across selected instances
|
|
||||||
form
|
|
||||||
.some-block.option-block
|
|
||||||
input(type="url" placeholder="https://libreddit.com")
|
|
||||||
button.add(type="submit")
|
|
||||||
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")
|
|
||||||
rect(fill="none" height="24" width="24")
|
|
||||||
path(d="M18,2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M18,16H9V4h9V16z M3,15v-2h2v2H3z M3,9.5h2v2H3V9.5z M10,20h2v2h-2V20z M3,18.5v-2h2v2H3z M5,22c-1.1,0-2-0.9-2-2h2V22z M8.5,22h-2v-2h2V22z M13.5,22L13.5,22l0-2h2 v0C15.5,21.1,14.6,22,13.5,22z M5,6L5,6l0,2H3v0C3,6.9,3.9,6,5,6z")
|
|
||||||
|
|
||||||
hr
|
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://libreddit.com')
|
+instances('https://libreddit.com')
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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 class="selected" href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a class="selected" href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
@ -154,361 +154,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="searxng">
|
<div id="searxng">
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_enableCustomSettings__">Enable Custom Settings (will use cookies)</h4>
|
|
||||||
<input id="enable-searxng-custom-settings" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="custom-settings">
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h2>General</h2>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Default categories</h4>
|
|
||||||
</div>
|
|
||||||
<div class="checklist-popup">
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"></path>
|
|
||||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M338.29 338.29L448 448"></path>
|
|
||||||
</svg>General
|
|
||||||
</div>
|
|
||||||
<input class="category_general" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<rect x="48" y="80" width="416" height="352" rx="48" ry="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></rect>
|
|
||||||
<circle cx="336" cy="176" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"></circle>
|
|
||||||
<path d="M304 335.79l-90.66-90.49a32 32 0 00-43.87-1.3L48 352M224 432l123.34-123.34a32 32 0 0143.11-2L464 368" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
</svg>Images
|
|
||||||
</div>
|
|
||||||
<input class="category_images" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M112 111v290c0 17.44 17 28.52 31 20.16l247.9-148.37c12.12-7.25 12.12-26.33 0-33.58L143 90.84c-14-8.36-31 2.72-31 20.16z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"></path>
|
|
||||||
</svg>Videos
|
|
||||||
</div>
|
|
||||||
<input class="category_videos" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M368 415.86V72a24.07 24.07 0 00-24-24H72a24.07 24.07 0 00-24 24v352a40.12 40.12 0 0040 40h328" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<path d="M416 464h0a48 48 0 01-48-48V128h72a24 24 0 0124 24v264a48 48 0 01-48 48z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M240 128h64M240 192h64M112 256h192M112 320h192M112 384h192"></path>
|
|
||||||
<path d="M176 208h-64a16 16 0 01-16-16v-64a16 16 0 0116-16h64a16 16 0 0116 16v64a16 16 0 01-16 16z"></path>
|
|
||||||
</svg>News
|
|
||||||
</div>
|
|
||||||
<input class="category_news" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M256 48c-79.5 0-144 61.39-144 137 0 87 96 224.87 131.25 272.49a15.77 15.77 0 0025.5 0C304 409.89 400 272.07 400 185c0-75.61-64.5-137-144-137z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<circle cx="256" cy="192" r="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></circle>
|
|
||||||
</svg>Maps
|
|
||||||
</div>
|
|
||||||
<input class="category_map" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M192 218v-6c0-14.84 10-27 24.24-30.59l174.59-46.68A20 20 0 01416 154v22" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<path d="M416 295.94v80c0 13.91-8.93 25.59-22 30l-22 8c-25.9 8.72-52-10.42-52-38h0a33.37 33.37 0 0123-32l51-18.15c13.07-4.4 22-15.94 22-29.85V58a10 10 0 00-12.6-9.61L204 102a16.48 16.48 0 00-12 16v226c0 13.91-8.93 25.6-22 30l-52 18c-13.88 4.68-22 17.22-22 32h0c0 27.58 26.52 46.55 52 38l22-8c13.07-4.4 22-16.08 22-30v-80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
</svg>Music
|
|
||||||
</div>
|
|
||||||
<input class="category_music" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg class="ion-icon-big" viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09zM160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<path d="M160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
</svg>It
|
|
||||||
</div>
|
|
||||||
<input class="category_it" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg class="ion-icon-big" viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M32 192L256 64l224 128-224 128L32 192z"></path>
|
|
||||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 240v128l144 80 144-80V240M480 368V192M256 320v128"></path>
|
|
||||||
</svg>Science
|
|
||||||
</div>
|
|
||||||
<input class="category_science" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M384 80H128c-26 0-43 14-48 40L48 272v112a48.14 48.14 0 0048 48h320a48.14 48.14 0 0048-48V272l-32-152c-5-27-23-40-48-40z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M48 272h144M320 272h144M192 272a64 64 0 00128 0M144 144h224M128 208h256"></path>
|
|
||||||
</svg>Files
|
|
||||||
</div>
|
|
||||||
<input class="category_files" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<svg viewBox="0 0 512 512" aria-hidden="true">
|
|
||||||
<path d="M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<path d="M336 304c-65.17 0-127.84 32.37-143.54 95.41-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"></path>
|
|
||||||
<path d="M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path>
|
|
||||||
<path d="M206 306c-18.05-8.27-37.93-11.45-59-11.45-52 0-102.1 25.85-114.65 76.2-1.65 6.66 2.53 13.25 9.37 13.25H154" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"></path>
|
|
||||||
</svg>Social Media
|
|
||||||
</div>
|
|
||||||
<input class="category_social_media" type="checkbox">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Search language</h4>
|
|
||||||
<select class="language">
|
|
||||||
<option value="all">Default language</option>
|
|
||||||
<option value="af-ZA">🇿🇦 Afrikaans (Suid-Afrika) </option>
|
|
||||||
<option value="ca-ES">🇪🇸 Català (Espanya) </option>
|
|
||||||
<option value="da-DK">🇩🇰 Dansk (Danmark) </option>
|
|
||||||
<option value="de">🌐 Deutsch </option>
|
|
||||||
<option value="de-AT">🇦🇹 Deutsch (Österreich) </option>
|
|
||||||
<option value="de-CH">🇨🇭 Deutsch (Schweiz) </option>
|
|
||||||
<option value="de-DE">🇩🇪 Deutsch (Deutschland) </option>
|
|
||||||
<option value="et-EE">🇪🇪 Eesti (Eesti) </option>
|
|
||||||
<option value="en">🌐 English </option>
|
|
||||||
<option value="en-AU">🇦🇺 English (Australia) </option>
|
|
||||||
<option value="en-CA">🇨🇦 English (Canada) </option>
|
|
||||||
<option value="en-GB">🇬🇧 English (United Kingdom) </option>
|
|
||||||
<option value="en-IE">🇮🇪 English (Ireland) </option>
|
|
||||||
<option value="en-MY">🇲🇾 English (Malaysia) </option>
|
|
||||||
<option value="en-NZ">🇳🇿 English (New Zealand) </option>
|
|
||||||
<option value="en-US">🇺🇸 English (United States) </option>
|
|
||||||
<option value="es">🌐 Español </option>
|
|
||||||
<option value="es-AR">🇦🇷 Español (Argentina) </option>
|
|
||||||
<option value="es-CL">🇨🇱 Español (Chile) </option>
|
|
||||||
<option value="es-ES">🇪🇸 Español (España) </option>
|
|
||||||
<option value="es-MX">🇲🇽 Español (México) </option>
|
|
||||||
<option value="fil-PH">🇵🇭 Filipino (Pilipinas) </option>
|
|
||||||
<option value="fr">🌐 Français </option>
|
|
||||||
<option value="fr-BE">🇧🇪 Français (Belgique) </option>
|
|
||||||
<option value="fr-CA">🇨🇦 Français (Canada) </option>
|
|
||||||
<option value="fr-CH">🇨🇭 Français (Suisse) </option>
|
|
||||||
<option value="fr-FR">🇫🇷 Français (France) </option>
|
|
||||||
<option value="hr-HR">🇭🇷 Hrvatski (Hrvatska) </option>
|
|
||||||
<option value="id-ID">🇮🇩 Indonesia (Indonesia) </option>
|
|
||||||
<option value="it-IT">🇮🇹 Italiano (Italia) </option>
|
|
||||||
<option value="sw-TZ">🇹🇿 Kiswahili (Tanzania) </option>
|
|
||||||
<option value="lv-LV">🇱🇻 Latviešu (Latvija) </option>
|
|
||||||
<option value="lt-LT">🇱🇹 Lietuvių (Lietuva) </option>
|
|
||||||
<option value="hu-HU">🇭🇺 Magyar (Magyarország) </option>
|
|
||||||
<option value="nl">🌐 Nederlands </option>
|
|
||||||
<option value="nl-BE">🇧🇪 Nederlands (België) </option>
|
|
||||||
<option value="nl-NL">🇳🇱 Nederlands (Nederland) </option>
|
|
||||||
<option value="no-NO">🇳🇴 Norsk </option>
|
|
||||||
<option value="pl-PL">🇵🇱 Polski (Polska) </option>
|
|
||||||
<option value="pt">🌐 Português </option>
|
|
||||||
<option value="pt-BR">🇧🇷 Português (Brasil) </option>
|
|
||||||
<option value="pt-PT">🇵🇹 Português (Portugal) </option>
|
|
||||||
<option value="ro-RO">🇷🇴 Română (România) </option>
|
|
||||||
<option value="sk-SK">🇸🇰 Slovenčina (Slovensko) </option>
|
|
||||||
<option value="sl-SI">🇸🇮 Slovenščina (Slovenija) </option>
|
|
||||||
<option value="fi-FI">🇫🇮 Suomi (Suomi) </option>
|
|
||||||
<option value="sv-SE">🇸🇪 Svenska (Sverige) </option>
|
|
||||||
<option value="vi-VN">🇻🇳 Tiếng Việt (Việt Nam) </option>
|
|
||||||
<option value="tr-TR">🇹🇷 Türkçe (Türkiye) </option>
|
|
||||||
<option value="is-IS">🇮🇸 Íslenska (Ísland) </option>
|
|
||||||
<option value="cs-CZ">🇨🇿 Čeština (Česko) </option>
|
|
||||||
<option value="el-GR">🇬🇷 Ελληνικά (Ελλάδα) </option>
|
|
||||||
<option value="be-BY">🇧🇾 Беларуская (Беларусь) </option>
|
|
||||||
<option value="bg-BG">🇧🇬 Български (България) </option>
|
|
||||||
<option value="ru-RU">🇷🇺 Русский (Россия) </option>
|
|
||||||
<option value="sr-RS">🇷🇸 Српски (Србија) </option>
|
|
||||||
<option value="uk-UA">🇺🇦 Українська (Україна) </option>
|
|
||||||
<option value="he-IL">🇮🇱 עברית (ישראל) </option>
|
|
||||||
<option value="ar-EG">🇪🇬 العربية (مصر) </option>
|
|
||||||
<option value="fa-IR">🇮🇷 فارسی (ایران) </option>
|
|
||||||
<option value="hi-IN">🇮🇳 हिन्दी (भारत) </option>
|
|
||||||
<option value="th-TH">🇹🇭 ไทย (ไทย) </option>
|
|
||||||
<option value="zh">🌐 中文 </option>
|
|
||||||
<option value="zh-CN">🇨🇳 中文 (中国) </option>
|
|
||||||
<option value="zh-HK">🇭🇰 中文 (中國香港) </option>
|
|
||||||
<option value="zh-TW">🇹🇼 中文 (台灣) </option>
|
|
||||||
<option value="ja-JP">🇯🇵 日本語 (日本) </option>
|
|
||||||
<option value="ko-KR">🇰🇷 한국어 (대한민국) </option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Autocomplete</h4>
|
|
||||||
<select class="autocomplete">
|
|
||||||
<option value=""> - </option>
|
|
||||||
<option value="dbpedia">dbpedia</option>
|
|
||||||
<option value="duckduckgo">duckduckgo</option>
|
|
||||||
<option value="google">google</option>
|
|
||||||
<option value="seznam">seznam</option>
|
|
||||||
<option value="startpage">startpage</option>
|
|
||||||
<option value="swisscows">swisscows</option>
|
|
||||||
<option value="qwant">qwant</option>
|
|
||||||
<option value="wikipedia">wikipedia</option>
|
|
||||||
<option value="brave">brave</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">SafeSearch</h4>
|
|
||||||
<select class="safesearch">
|
|
||||||
<option value="2">Strict</option>
|
|
||||||
<option value="1">Moderate</option>
|
|
||||||
<option value="0">None</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Hostname replace</h4>
|
|
||||||
<input class="hostname_replace" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Open Access DOI rewrite</h4>
|
|
||||||
<input class="oa_doi_rewrite" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Open Access DOI resolver</h4>
|
|
||||||
<select class="doi_resolver">
|
|
||||||
<option value="oadoi.org">oadoi.org - https://oadoi.org/</option>
|
|
||||||
<option value="doi.org">doi.org - https://doi.org/</option>
|
|
||||||
<option value="doai.io">doai.io - https://dissem.in/</option>
|
|
||||||
<option value="sci-hub.se">sci-hub.se - https://sci-hub.se/</option>
|
|
||||||
<option value="sci-hub.do">sci-hub.do - https://sci-hub.do/</option>
|
|
||||||
<option value="scihubtw.tw">scihubtw.tw - https://scihubtw.tw/</option>
|
|
||||||
<option value="sci-hub.st">sci-hub.st - https://sci-hub.st/</option>
|
|
||||||
<option value="sci-hub.bar">sci-hub.bar - https://sci-hub.bar/</option>
|
|
||||||
<option value="sci-hub.it.nf">sci-hub.it.nf - https://sci-hub.it.nf/</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Engine tokens</h4>
|
|
||||||
<input class="tokens" type="text">
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h2>User Interface</h2>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Interface language</h4>
|
|
||||||
<select class="locale">
|
|
||||||
<option value="ar">العربية (Arabic)</option>
|
|
||||||
<option value="bg">Български (Bulgarian)</option>
|
|
||||||
<option value="bo">བོད་སྐད་ (Tibetan)</option>
|
|
||||||
<option value="ca">Català (Catalan)</option>
|
|
||||||
<option value="cs">Čeština (Czech)</option>
|
|
||||||
<option value="cy">Cymraeg (Welsh)</option>
|
|
||||||
<option value="da">Dansk (Danish)</option>
|
|
||||||
<option value="de">Deutsch (German)</option>
|
|
||||||
<option value="el-GR">Ελληνικά, Ελλάδα (Greek, Greece)</option>
|
|
||||||
<option value="en" selected="selected">English</option>
|
|
||||||
<option value="eo">Esperanto</option>
|
|
||||||
<option value="es">Español (Spanish)</option>
|
|
||||||
<option value="et">Eesti (Estonian)</option>
|
|
||||||
<option value="eu">Euskara (Basque)</option>
|
|
||||||
<option value="fa-IR">فارسی, ایران (Persian, Iran)</option>
|
|
||||||
<option value="fi">Suomi (Finnish)</option>
|
|
||||||
<option value="fil">Filipino</option>
|
|
||||||
<option value="fr">Français (French)</option>
|
|
||||||
<option value="gl">Galego (Galician)</option>
|
|
||||||
<option value="he">עברית (Hebrew)</option>
|
|
||||||
<option value="hr">Hrvatski (Croatian)</option>
|
|
||||||
<option value="hu">Magyar (Hungarian)</option>
|
|
||||||
<option value="ia">Interlingua</option>
|
|
||||||
<option value="id">Indonesia (Indonesian)</option>
|
|
||||||
<option value="it">Italiano (Italian)</option>
|
|
||||||
<option value="ja">日本語 (Japanese)</option>
|
|
||||||
<option value="ko">한국어 (Korean)</option>
|
|
||||||
<option value="lt">Lietuvių (Lithuanian)</option>
|
|
||||||
<option value="nb-NO">Norsk bokmål, Norge (Norwegian bokmål, Norway)</option>
|
|
||||||
<option value="nl">Nederlands (Dutch)</option>
|
|
||||||
<option value="nl-BE">Vlaams (Dutch, Belgium)</option>
|
|
||||||
<option value="oc">Occitan</option>
|
|
||||||
<option value="pl">Polski (Polish)</option>
|
|
||||||
<option value="pt">Português (Portuguese)</option>
|
|
||||||
<option value="pt-BR">Português, Brasil (Portuguese, Brazil)</option>
|
|
||||||
<option value="ro">Română (Romanian)</option>
|
|
||||||
<option value="ru">Русский (Russian)</option>
|
|
||||||
<option value="sk">Slovenčina (Slovak)</option>
|
|
||||||
<option value="sl">Slovenščina (Slovenian)</option>
|
|
||||||
<option value="sr">Српски (Serbian)</option>
|
|
||||||
<option value="sv">Svenska (Swedish)</option>
|
|
||||||
<option value="ta">தமிழ் (Tamil)</option>
|
|
||||||
<option value="te">తెలుగు (Telugu)</option>
|
|
||||||
<option value="tr">Türkçe (Turkish)</option>
|
|
||||||
<option value="uk">Українська (Ukrainian)</option>
|
|
||||||
<option value="vi">Tiếng việt (Vietnamese)</option>
|
|
||||||
<option value="zh-Hans-CN">中文, 中国 (Chinese, China)</option>
|
|
||||||
<option value="zh-Hant-TW">中文, 台灣 (Chinese, Taiwan)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Theme</h4>
|
|
||||||
<select class="theme">
|
|
||||||
<option value="simple">simple</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Theme style</h4>
|
|
||||||
<select class="simple_style">
|
|
||||||
<option value="auto">auto</option>
|
|
||||||
<option value="light">light</option>
|
|
||||||
<option value="dark">dark</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Results on new tabs</h4>
|
|
||||||
<select class="results_on_new_tab">
|
|
||||||
<option value="1">On</option>
|
|
||||||
<option value="0">Off</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Infinite scroll</h4>
|
|
||||||
<select class="infinite_scroll">
|
|
||||||
<option value="1">On</option>
|
|
||||||
<option value="0">Off</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Search on category select</h4>
|
|
||||||
<input class="search_on_category_select" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Vim-like hotkeys</h4>
|
|
||||||
<input class="vim_hotkeys" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h2>Privacy </h2>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">HTTP Method</h4>
|
|
||||||
<select class="method">
|
|
||||||
<option value="POST">POST</option>
|
|
||||||
<option value="GET">GET</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Image proxy</h4>
|
|
||||||
<select class="image_proxy">
|
|
||||||
<option value="1">Enabled</option>
|
|
||||||
<option value="0">Disabled</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Query in the page's title</h4>
|
|
||||||
<select class="query_in_title">
|
|
||||||
<option value="1">Enabled</option>
|
|
||||||
<option value="">Disabled</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="">Tracker URL remover</h4>
|
|
||||||
<input class="tracker_url_remover" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
<div class="normal">
|
<div class="normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
@ -2,116 +2,70 @@ import searchHelper from "../../../assets/javascripts/helpers/search.js";
|
|||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let searxDiv = document.getElementById("searx");
|
let searxDiv = document.getElementById("searx");
|
||||||
|
|
||||||
let searxngDiv = document.getElementById("searxng");
|
let searxngDiv = document.getElementById("searxng");
|
||||||
let searxngCustomSettings = document.getElementById("enable-searxng-custom-settings");
|
|
||||||
|
|
||||||
let searxngCustomSettingsDiv = searxngDiv.getElementsByClassName('custom-settings')[0]
|
|
||||||
|
|
||||||
let whoogleDiv = document.getElementById("whoogle");
|
let whoogleDiv = document.getElementById("whoogle");
|
||||||
|
|
||||||
let disableSearchElement = document.getElementById("disable-search");
|
let disable = document.getElementById("disable-search");
|
||||||
let searchFrontendElement = document.getElementById("search-frontend");
|
let frontend = document.getElementById("search-frontend");
|
||||||
let protocolElement = document.getElementById("protocol")
|
let protocol = document.getElementById("protocol")
|
||||||
|
|
||||||
let customSettingsDivElement = document.getElementsByClassName("custom-settings");
|
const searxngForm = searxngDiv.getElementsByTagName('form')[0];
|
||||||
|
const searxngCookies = searxngForm.getElementsByTagName('input')[0];
|
||||||
|
searxngForm.addEventListener('submit', async event => {
|
||||||
|
event.preventDefault();
|
||||||
|
const url = new URL(searxngCookies.value);
|
||||||
|
searchHelper.initSearxngCookies(url);
|
||||||
|
});
|
||||||
|
|
||||||
let checkboxes_xpath = document.evaluate(
|
const searxForm = searxDiv.getElementsByTagName('form')[0];
|
||||||
"//div[@id='searxng']//input[@type='checkbox']",
|
const searxCookies = searxForm.getElementsByTagName('input')[0];
|
||||||
document, null, XPathResult.ANY_TYPE, null,
|
searxForm.addEventListener('submit', async event => {
|
||||||
);
|
event.preventDefault();
|
||||||
const inputChecked = [];
|
const url = new URL(searxCookies.value);
|
||||||
let checkbox = checkboxes_xpath.iterateNext();
|
searchHelper.initSearxCookies(url);
|
||||||
while (checkbox) {
|
});
|
||||||
inputChecked.push(checkbox);
|
|
||||||
checkbox = checkboxes_xpath.iterateNext();
|
|
||||||
}
|
|
||||||
|
|
||||||
let textInputs_xpath = document.evaluate(
|
|
||||||
"//div[@id='searxng']//input[@type='text']",
|
|
||||||
document, null, XPathResult.ANY_TYPE, null,
|
|
||||||
);
|
|
||||||
const inputValues = [];
|
|
||||||
let textInput = textInputs_xpath.iterateNext();
|
|
||||||
while (textInput) {
|
|
||||||
inputValues.push(textInput);
|
|
||||||
textInput = textInputs_xpath.iterateNext();
|
|
||||||
}
|
|
||||||
inputValues.push(...searxngCustomSettingsDiv.getElementsByTagName('select'));
|
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disableSearch",
|
"disableSearch",
|
||||||
"searchFrontend",
|
"searchFrontend",
|
||||||
"searchProtocol",
|
"searchProtocol",
|
||||||
"searxngCustomSettings"
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableSearchElement.checked = !r.disableSearch;
|
disable.checked = !r.disableSearch;
|
||||||
|
frontend.value = r.searchFrontend;
|
||||||
|
protocol.value = r.searchProtocol;
|
||||||
|
|
||||||
searchFrontendElement.value = r.searchFrontend;
|
changeFrontendsSettings();
|
||||||
changeFrontendsSettings(r.searchFrontend);
|
changeProtocolSettings();
|
||||||
|
|
||||||
protocolElement.value = r.searchProtocol;
|
|
||||||
changeProtocolSettings(r.searchProtocol);
|
|
||||||
|
|
||||||
|
|
||||||
searxngCustomSettings.checked = r.searxngCustomSettings
|
|
||||||
changeCustomSettings()
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const element of inputChecked) {
|
|
||||||
let k = `searxng_${element.className}`
|
|
||||||
browser.storage.local.get(k, r => element.checked = r[k])
|
|
||||||
}
|
|
||||||
for (const element of inputValues) {
|
|
||||||
let k = `searxng_${element.className}`
|
|
||||||
browser.storage.local.get(k, r => element.value = r[k])
|
|
||||||
}
|
|
||||||
|
|
||||||
searxngCustomSettingsDiv.addEventListener("change", async () => {
|
|
||||||
for (const element of inputChecked)
|
|
||||||
browser.storage.local.set({ [`searxng_${element.className}`]: element.checked })
|
|
||||||
|
|
||||||
for (const element of inputValues)
|
|
||||||
browser.storage.local.set({ [`searxng_${element.className}`]: element.value });
|
|
||||||
})
|
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableSearch: !disableSearchElement.checked,
|
disableSearch: !disable.checked,
|
||||||
searchFrontend: searchFrontendElement.value,
|
searchFrontend: frontend.value,
|
||||||
searchProtocol: protocolElement.value,
|
searchProtocol: protocol.value,
|
||||||
searxngCustomSettings: searxngCustomSettings.checked,
|
|
||||||
});
|
});
|
||||||
changeFrontendsSettings(searchFrontendElement.value);
|
changeFrontendsSettings(frontend.value);
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeProtocolSettings(protocol.value);
|
||||||
changeCustomSettings();
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeCustomSettings() {
|
function changeFrontendsSettings() {
|
||||||
if (searxngCustomSettings.checked)
|
|
||||||
for (const item of customSettingsDivElement) item.style.display = 'block';
|
|
||||||
else
|
|
||||||
for (const item of customSettingsDivElement) item.style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeFrontendsSettings(frontend) {
|
|
||||||
let SearxWhoogleElement = document.getElementById("searx-whoogle");
|
let SearxWhoogleElement = document.getElementById("searx-whoogle");
|
||||||
if (frontend == 'searx') {
|
if (frontend.value == 'searx') {
|
||||||
searxDiv.style.display = 'block';
|
searxDiv.style.display = 'block';
|
||||||
searxngDiv.style.display = 'none';
|
searxngDiv.style.display = 'none';
|
||||||
whoogleDiv.style.display = 'none';
|
whoogleDiv.style.display = 'none';
|
||||||
SearxWhoogleElement.style.display = 'block';
|
SearxWhoogleElement.style.display = 'block';
|
||||||
}
|
}
|
||||||
else if (frontend == 'searxng') {
|
else if (frontend.value == 'searxng') {
|
||||||
searxDiv.style.display = 'none';
|
searxDiv.style.display = 'none';
|
||||||
searxngDiv.style.display = 'block';
|
searxngDiv.style.display = 'block';
|
||||||
whoogleDiv.style.display = 'none';
|
whoogleDiv.style.display = 'none';
|
||||||
SearxWhoogleElement.style.display = 'block';
|
SearxWhoogleElement.style.display = 'block';
|
||||||
}
|
}
|
||||||
else if (frontend == 'whoogle') {
|
else if (frontend.value == 'whoogle') {
|
||||||
searxDiv.style.display = 'none';
|
searxDiv.style.display = 'none';
|
||||||
searxngDiv.style.display = 'none';
|
searxngDiv.style.display = 'none';
|
||||||
whoogleDiv.style.display = 'block';
|
whoogleDiv.style.display = 'block';
|
||||||
@ -119,7 +73,7 @@ function changeFrontendsSettings(frontend) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalsearxDiv = searxDiv.getElementsByClassName("normal")[0];
|
let normalsearxDiv = searxDiv.getElementsByClassName("normal")[0];
|
||||||
let torsearxDiv = searxDiv.getElementsByClassName("tor")[0];
|
let torsearxDiv = searxDiv.getElementsByClassName("tor")[0];
|
||||||
let i2psearxDiv = searxDiv.getElementsByClassName("i2p")[0];
|
let i2psearxDiv = searxDiv.getElementsByClassName("i2p")[0];
|
||||||
@ -132,35 +86,41 @@ function changeProtocolSettings(protocol) {
|
|||||||
let torwhoogleDiv = whoogleDiv.getElementsByClassName("tor")[0];
|
let torwhoogleDiv = whoogleDiv.getElementsByClassName("tor")[0];
|
||||||
let i2pwhoogleDiv = whoogleDiv.getElementsByClassName("i2p")[0];
|
let i2pwhoogleDiv = whoogleDiv.getElementsByClassName("i2p")[0];
|
||||||
|
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalsearxDiv.style.display = 'block';
|
normalsearxDiv.style.display = 'block';
|
||||||
normalsearxngDiv.style.display = 'block';
|
normalsearxngDiv.style.display = 'block';
|
||||||
normalwhoogleDiv.style.display = 'block';
|
normalwhoogleDiv.style.display = 'block';
|
||||||
|
|
||||||
torsearxDiv.style.display = 'none';
|
torsearxDiv.style.display = 'none';
|
||||||
torsearxngDiv.style.display = 'none';
|
torsearxngDiv.style.display = 'none';
|
||||||
torwhoogleDiv.style.display = 'none';
|
torwhoogleDiv.style.display = 'none';
|
||||||
|
|
||||||
i2psearxDiv.style.display = 'none';
|
i2psearxDiv.style.display = 'none';
|
||||||
i2psearxngDiv.style.display = 'none';
|
i2psearxngDiv.style.display = 'none';
|
||||||
i2pwhoogleDiv.style.display = 'none';
|
i2pwhoogleDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalsearxDiv.style.display = 'none';
|
normalsearxDiv.style.display = 'none';
|
||||||
normalsearxngDiv.style.display = 'none';
|
normalsearxngDiv.style.display = 'none';
|
||||||
normalwhoogleDiv.style.display = 'none';
|
normalwhoogleDiv.style.display = 'none';
|
||||||
|
|
||||||
torsearxDiv.style.display = 'block';
|
torsearxDiv.style.display = 'block';
|
||||||
torsearxngDiv.style.display = 'block';
|
torsearxngDiv.style.display = 'block';
|
||||||
torwhoogleDiv.style.display = 'block';
|
torwhoogleDiv.style.display = 'block';
|
||||||
|
|
||||||
i2psearxDiv.style.display = 'none';
|
i2psearxDiv.style.display = 'none';
|
||||||
i2psearxngDiv.style.display = 'none';
|
i2psearxngDiv.style.display = 'none';
|
||||||
i2pwhoogleDiv.style.display = 'none';
|
i2pwhoogleDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'i2p') {
|
else if (protocol.value == 'i2p') {
|
||||||
normalsearxDiv.style.display = 'none';
|
normalsearxDiv.style.display = 'none';
|
||||||
normalsearxngDiv.style.display = 'none';
|
normalsearxngDiv.style.display = 'none';
|
||||||
normalwhoogleDiv.style.display = 'none';
|
normalwhoogleDiv.style.display = 'none';
|
||||||
|
|
||||||
torsearxDiv.style.display = 'none';
|
torsearxDiv.style.display = 'none';
|
||||||
torsearxngDiv.style.display = 'none';
|
torsearxngDiv.style.display = 'none';
|
||||||
torwhoogleDiv.style.display = 'none';
|
torwhoogleDiv.style.display = 'none';
|
||||||
|
|
||||||
i2psearxDiv.style.display = 'block';
|
i2psearxDiv.style.display = 'block';
|
||||||
i2psearxngDiv.style.display = 'block';
|
i2psearxngDiv.style.display = 'block';
|
||||||
i2pwhoogleDiv.style.display = 'block';
|
i2pwhoogleDiv.style.display = 'block';
|
||||||
@ -232,9 +192,4 @@ latencyWhoogleElement.addEventListener("click",
|
|||||||
latencyWhoogleElement.removeEventListener("click", reloadWindow);
|
latencyWhoogleElement.removeEventListener("click", reloadWindow);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
window.onblur = () => {
|
|
||||||
searchHelper.initSearxCookies();
|
|
||||||
searchHelper.initSearxngCookies();
|
|
||||||
}
|
|
@ -46,340 +46,7 @@ body.option(dir="auto")
|
|||||||
+instances('https://searx.i2p')
|
+instances('https://searx.i2p')
|
||||||
|
|
||||||
#searxng
|
#searxng
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enableCustomSettings__") Enable Custom Settings (will use cookies)
|
|
||||||
input#enable-searxng-custom-settings(type="checkbox")
|
|
||||||
hr
|
hr
|
||||||
.custom-settings
|
|
||||||
.some-block.option-block
|
|
||||||
h2 General
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Default categories
|
|
||||||
|
|
||||||
.checklist-popup
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32")
|
|
||||||
path(fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M338.29 338.29L448 448")
|
|
||||||
|General
|
|
||||||
input.category_general(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
rect(x="48" y="80" width="416" height="352" rx="48" ry="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32")
|
|
||||||
circle(cx="336" cy="176" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32")
|
|
||||||
path(d="M304 335.79l-90.66-90.49a32 32 0 00-43.87-1.3L48 352M224 432l123.34-123.34a32 32 0 0143.11-2L464 368" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
|Images
|
|
||||||
|
|
||||||
input.category_images(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M112 111v290c0 17.44 17 28.52 31 20.16l247.9-148.37c12.12-7.25 12.12-26.33 0-33.58L143 90.84c-14-8.36-31 2.72-31 20.16z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32")
|
|
||||||
|Videos
|
|
||||||
input.category_videos(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M368 415.86V72a24.07 24.07 0 00-24-24H72a24.07 24.07 0 00-24 24v352a40.12 40.12 0 0040 40h328" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32")
|
|
||||||
path(d="M416 464h0a48 48 0 01-48-48V128h72a24 24 0 0124 24v264a48 48 0 01-48 48z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32")
|
|
||||||
path(fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M240 128h64M240 192h64M112 256h192M112 320h192M112 384h192")
|
|
||||||
path(d="M176 208h-64a16 16 0 01-16-16v-64a16 16 0 0116-16h64a16 16 0 0116 16v64a16 16 0 01-16 16z")
|
|
||||||
|News
|
|
||||||
input.category_news(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M256 48c-79.5 0-144 61.39-144 137 0 87 96 224.87 131.25 272.49a15.77 15.77 0 0025.5 0C304 409.89 400 272.07 400 185c0-75.61-64.5-137-144-137z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
circle(cx="256" cy="192" r="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
|Maps
|
|
||||||
input.category_map(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M192 218v-6c0-14.84 10-27 24.24-30.59l174.59-46.68A20 20 0 01416 154v22" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
path(d="M416 295.94v80c0 13.91-8.93 25.59-22 30l-22 8c-25.9 8.72-52-10.42-52-38h0a33.37 33.37 0 0123-32l51-18.15c13.07-4.4 22-15.94 22-29.85V58a10 10 0 00-12.6-9.61L204 102a16.48 16.48 0 00-12 16v226c0 13.91-8.93 25.6-22 30l-52 18c-13.88 4.68-22 17.22-22 32h0c0 27.58 26.52 46.55 52 38l22-8c13.07-4.4 22-16.08 22-30v-80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
|Music
|
|
||||||
input.category_music(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(class="ion-icon-big" viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09zM160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
path(d="M160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
|It
|
|
||||||
input.category_it(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(class="ion-icon-big" viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M32 192L256 64l224 128-224 128L32 192z")
|
|
||||||
path(fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 240v128l144 80 144-80V240M480 368V192M256 320v128")
|
|
||||||
|Science
|
|
||||||
input.category_science(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M384 80H128c-26 0-43 14-48 40L48 272v112a48.14 48.14 0 0048 48h320a48.14 48.14 0 0048-48V272l-32-152c-5-27-23-40-48-40z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32")
|
|
||||||
path(fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M48 272h144M320 272h144M192 272a64 64 0 00128 0M144 144h224M128 208h256")
|
|
||||||
|Files
|
|
||||||
input.category_files(type="checkbox")
|
|
||||||
|
|
||||||
div
|
|
||||||
div
|
|
||||||
svg(viewBox="0 0 512 512" aria-hidden="true")
|
|
||||||
path(d="M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
path(d="M336 304c-65.17 0-127.84 32.37-143.54 95.41-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32")
|
|
||||||
path(d="M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32")
|
|
||||||
path(d="M206 306c-18.05-8.27-37.93-11.45-59-11.45-52 0-102.1 25.85-114.65 76.2-1.65 6.66 2.53 13.25 9.37 13.25H154" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32")
|
|
||||||
|Social Media
|
|
||||||
input.category_social_media(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Search language
|
|
||||||
select.language
|
|
||||||
option(value="all") Default language
|
|
||||||
option(value="af-ZA") 🇿🇦 Afrikaans (Suid-Afrika)
|
|
||||||
option(value="ca-ES") 🇪🇸 Català (Espanya)
|
|
||||||
option(value="da-DK") 🇩🇰 Dansk (Danmark)
|
|
||||||
option(value="de") 🌐 Deutsch
|
|
||||||
option(value="de-AT") 🇦🇹 Deutsch (Österreich)
|
|
||||||
option(value="de-CH") 🇨🇭 Deutsch (Schweiz)
|
|
||||||
option(value="de-DE") 🇩🇪 Deutsch (Deutschland)
|
|
||||||
option(value="et-EE") 🇪🇪 Eesti (Eesti)
|
|
||||||
option(value="en") 🌐 English
|
|
||||||
option(value="en-AU") 🇦🇺 English (Australia)
|
|
||||||
option(value="en-CA") 🇨🇦 English (Canada)
|
|
||||||
option(value="en-GB") 🇬🇧 English (United Kingdom)
|
|
||||||
option(value="en-IE") 🇮🇪 English (Ireland)
|
|
||||||
option(value="en-MY") 🇲🇾 English (Malaysia)
|
|
||||||
option(value="en-NZ") 🇳🇿 English (New Zealand)
|
|
||||||
option(value="en-US") 🇺🇸 English (United States)
|
|
||||||
option(value="es") 🌐 Español
|
|
||||||
option(value="es-AR") 🇦🇷 Español (Argentina)
|
|
||||||
option(value="es-CL") 🇨🇱 Español (Chile)
|
|
||||||
option(value="es-ES") 🇪🇸 Español (España)
|
|
||||||
option(value="es-MX") 🇲🇽 Español (México)
|
|
||||||
option(value="fil-PH") 🇵🇭 Filipino (Pilipinas)
|
|
||||||
option(value="fr") 🌐 Français
|
|
||||||
option(value="fr-BE") 🇧🇪 Français (Belgique)
|
|
||||||
option(value="fr-CA") 🇨🇦 Français (Canada)
|
|
||||||
option(value="fr-CH") 🇨🇭 Français (Suisse)
|
|
||||||
option(value="fr-FR") 🇫🇷 Français (France)
|
|
||||||
option(value="hr-HR") 🇭🇷 Hrvatski (Hrvatska)
|
|
||||||
option(value="id-ID") 🇮🇩 Indonesia (Indonesia)
|
|
||||||
option(value="it-IT") 🇮🇹 Italiano (Italia)
|
|
||||||
option(value="sw-TZ") 🇹🇿 Kiswahili (Tanzania)
|
|
||||||
option(value="lv-LV") 🇱🇻 Latviešu (Latvija)
|
|
||||||
option(value="lt-LT") 🇱🇹 Lietuvių (Lietuva)
|
|
||||||
option(value="hu-HU") 🇭🇺 Magyar (Magyarország)
|
|
||||||
option(value="nl") 🌐 Nederlands
|
|
||||||
option(value="nl-BE") 🇧🇪 Nederlands (België)
|
|
||||||
option(value="nl-NL") 🇳🇱 Nederlands (Nederland)
|
|
||||||
option(value="no-NO") 🇳🇴 Norsk
|
|
||||||
option(value="pl-PL") 🇵🇱 Polski (Polska)
|
|
||||||
option(value="pt") 🌐 Português
|
|
||||||
option(value="pt-BR") 🇧🇷 Português (Brasil)
|
|
||||||
option(value="pt-PT") 🇵🇹 Português (Portugal)
|
|
||||||
option(value="ro-RO") 🇷🇴 Română (România)
|
|
||||||
option(value="sk-SK") 🇸🇰 Slovenčina (Slovensko)
|
|
||||||
option(value="sl-SI") 🇸🇮 Slovenščina (Slovenija)
|
|
||||||
option(value="fi-FI") 🇫🇮 Suomi (Suomi)
|
|
||||||
option(value="sv-SE") 🇸🇪 Svenska (Sverige)
|
|
||||||
option(value="vi-VN") 🇻🇳 Tiếng Việt (Việt Nam)
|
|
||||||
option(value="tr-TR") 🇹🇷 Türkçe (Türkiye)
|
|
||||||
option(value="is-IS") 🇮🇸 Íslenska (Ísland)
|
|
||||||
option(value="cs-CZ") 🇨🇿 Čeština (Česko)
|
|
||||||
option(value="el-GR") 🇬🇷 Ελληνικά (Ελλάδα)
|
|
||||||
option(value="be-BY") 🇧🇾 Беларуская (Беларусь)
|
|
||||||
option(value="bg-BG") 🇧🇬 Български (България)
|
|
||||||
option(value="ru-RU") 🇷🇺 Русский (Россия)
|
|
||||||
option(value="sr-RS") 🇷🇸 Српски (Србија)
|
|
||||||
option(value="uk-UA") 🇺🇦 Українська (Україна)
|
|
||||||
option(value="he-IL") 🇮🇱 עברית (ישראל)
|
|
||||||
option(value="ar-EG") 🇪🇬 العربية (مصر)
|
|
||||||
option(value="fa-IR") 🇮🇷 فارسی (ایران)
|
|
||||||
option(value="hi-IN") 🇮🇳 हिन्दी (भारत)
|
|
||||||
option(value="th-TH") 🇹🇭 ไทย (ไทย)
|
|
||||||
option(value="zh") 🌐 中文
|
|
||||||
option(value="zh-CN") 🇨🇳 中文 (中国)
|
|
||||||
option(value="zh-HK") 🇭🇰 中文 (中國香港)
|
|
||||||
option(value="zh-TW") 🇹🇼 中文 (台灣)
|
|
||||||
option(value="ja-JP") 🇯🇵 日本語 (日本)
|
|
||||||
option(value="ko-KR") 🇰🇷 한국어 (대한민국)
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Autocomplete
|
|
||||||
select.autocomplete
|
|
||||||
option(value="") -
|
|
||||||
option(value="dbpedia") dbpedia
|
|
||||||
option(value="duckduckgo") duckduckgo
|
|
||||||
option(value="google") google
|
|
||||||
option(value="seznam") seznam
|
|
||||||
option(value="startpage") startpage
|
|
||||||
option(value="swisscows") swisscows
|
|
||||||
option(value="qwant") qwant
|
|
||||||
option(value="wikipedia") wikipedia
|
|
||||||
option(value="brave") brave
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") SafeSearch
|
|
||||||
select.safesearch
|
|
||||||
option(value="2") Strict
|
|
||||||
option(value="1") Moderate
|
|
||||||
option(value="0") None
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Hostname replace
|
|
||||||
input.hostname_replace(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Open Access DOI rewrite
|
|
||||||
input.oa_doi_rewrite(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Open Access DOI resolver
|
|
||||||
select.doi_resolver
|
|
||||||
option(value="oadoi.org") oadoi.org - https://oadoi.org/
|
|
||||||
option(value="doi.org") doi.org - https://doi.org/
|
|
||||||
option(value="doai.io") doai.io - https://dissem.in/
|
|
||||||
option(value="sci-hub.se") sci-hub.se - https://sci-hub.se/
|
|
||||||
option(value="sci-hub.do") sci-hub.do - https://sci-hub.do/
|
|
||||||
option(value="scihubtw.tw") scihubtw.tw - https://scihubtw.tw/
|
|
||||||
option(value="sci-hub.st") sci-hub.st - https://sci-hub.st/
|
|
||||||
option(value="sci-hub.bar") sci-hub.bar - https://sci-hub.bar/
|
|
||||||
option(value="sci-hub.it.nf") sci-hub.it.nf - https://sci-hub.it.nf/
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Engine tokens
|
|
||||||
input.tokens(type="text")
|
|
||||||
|
|
||||||
hr
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h2 User Interface
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Interface language
|
|
||||||
select.locale
|
|
||||||
option(value="ar") العربية (Arabic)
|
|
||||||
option(value="bg") Български (Bulgarian)
|
|
||||||
option(value="bo") བོད་སྐད་ (Tibetan)
|
|
||||||
option(value="ca") Català (Catalan)
|
|
||||||
option(value="cs") Čeština (Czech)
|
|
||||||
option(value="cy") Cymraeg (Welsh)
|
|
||||||
option(value="da") Dansk (Danish)
|
|
||||||
option(value="de") Deutsch (German)
|
|
||||||
option(value="el-GR") Ελληνικά, Ελλάδα (Greek, Greece)
|
|
||||||
option(value="en" selected="selected") English
|
|
||||||
option(value="eo") Esperanto
|
|
||||||
option(value="es") Español (Spanish)
|
|
||||||
option(value="et") Eesti (Estonian)
|
|
||||||
option(value="eu") Euskara (Basque)
|
|
||||||
option(value="fa-IR") فارسی, ایران (Persian, Iran)
|
|
||||||
option(value="fi") Suomi (Finnish)
|
|
||||||
option(value="fil") Filipino
|
|
||||||
option(value="fr") Français (French)
|
|
||||||
option(value="gl") Galego (Galician)
|
|
||||||
option(value="he") עברית (Hebrew)
|
|
||||||
option(value="hr") Hrvatski (Croatian)
|
|
||||||
option(value="hu") Magyar (Hungarian)
|
|
||||||
option(value="ia") Interlingua
|
|
||||||
option(value="id") Indonesia (Indonesian)
|
|
||||||
option(value="it") Italiano (Italian)
|
|
||||||
option(value="ja") 日本語 (Japanese)
|
|
||||||
option(value="ko") 한국어 (Korean)
|
|
||||||
option(value="lt") Lietuvių (Lithuanian)
|
|
||||||
option(value="nb-NO") Norsk bokmål, Norge (Norwegian bokmål, Norway)
|
|
||||||
option(value="nl") Nederlands (Dutch)
|
|
||||||
option(value="nl-BE") Vlaams (Dutch, Belgium)
|
|
||||||
option(value="oc") Occitan
|
|
||||||
option(value="pl") Polski (Polish)
|
|
||||||
option(value="pt") Português (Portuguese)
|
|
||||||
option(value="pt-BR") Português, Brasil (Portuguese, Brazil)
|
|
||||||
option(value="ro") Română (Romanian)
|
|
||||||
option(value="ru") Русский (Russian)
|
|
||||||
option(value="sk") Slovenčina (Slovak)
|
|
||||||
option(value="sl") Slovenščina (Slovenian)
|
|
||||||
option(value="sr") Српски (Serbian)
|
|
||||||
option(value="sv") Svenska (Swedish)
|
|
||||||
option(value="ta") தமிழ் (Tamil)
|
|
||||||
option(value="te") తెలుగు (Telugu)
|
|
||||||
option(value="tr") Türkçe (Turkish)
|
|
||||||
option(value="uk") Українська (Ukrainian)
|
|
||||||
option(value="vi") Tiếng việt (Vietnamese)
|
|
||||||
option(value="zh-Hans-CN") 中文, 中国 (Chinese, China)
|
|
||||||
option(value="zh-Hant-TW") 中文, 台灣 (Chinese, Taiwan)
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Theme
|
|
||||||
select.theme
|
|
||||||
option(value="simple") simple
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Theme style
|
|
||||||
select.simple_style
|
|
||||||
option(value="auto") auto
|
|
||||||
option(value="light") light
|
|
||||||
option(value="dark") dark
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Results on new tabs
|
|
||||||
select.results_on_new_tab
|
|
||||||
option(value="1") On
|
|
||||||
option(value="0") Off
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Infinite scroll
|
|
||||||
select.infinite_scroll
|
|
||||||
option(value="1") On
|
|
||||||
option(value="0") Off
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Search on category select
|
|
||||||
input.search_on_category_select(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Vim-like hotkeys
|
|
||||||
input.vim_hotkeys(type="checkbox")
|
|
||||||
|
|
||||||
hr
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h2 Privacy
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") HTTP Method
|
|
||||||
select.method
|
|
||||||
option(value="POST") POST
|
|
||||||
option(value="GET") GET
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Image proxy
|
|
||||||
select.image_proxy
|
|
||||||
option(value="1") Enabled
|
|
||||||
option(value="0") Disabled
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Query in the page's title
|
|
||||||
select.query_in_title
|
|
||||||
option(value="1") Enabled
|
|
||||||
option(value="") Disabled
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="") Tracker URL remover
|
|
||||||
input.tracker_url_remover(type="checkbox")
|
|
||||||
|
|
||||||
hr
|
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://searxng.com')
|
+instances('https://searxng.com')
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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 class="selected" href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a class="selected" href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import sendTargetsHelper from "../../../assets/javascripts/helpers/sendTargets.js";
|
import sendTargetsHelper from "../../../assets/javascripts/helpers/sendTargets.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableSendTargetsElement = document.getElementById("disable-sendTargets");
|
let disable = document.getElementById("disable-sendTargets");
|
||||||
let protocolElement = document.getElementById("protocol")
|
let protocol = document.getElementById("protocol")
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
@ -10,29 +10,28 @@ browser.storage.local.get(
|
|||||||
"sendTargetsProtocol",
|
"sendTargetsProtocol",
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableSendTargetsElement.checked = !r.disableSendTarget;
|
disable.checked = !r.disableSendTarget;
|
||||||
|
protocol.value = r.sendTargetsProtocol;
|
||||||
protocolElement.value = r.sendTargetsProtocol;
|
changeProtocolSettings();
|
||||||
changeProtocolSettings(r.sendTargetsProtocol);
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableSendTarget: !disableSendTargetsElement.checked,
|
disableSendTarget: !disable.checked,
|
||||||
sendTargetsProtocol: protocolElement.value,
|
sendTargetsProtocol: protocol.value,
|
||||||
})
|
})
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeProtocolSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalDiv = document.getElementsByClassName("normal")[0];
|
let normalDiv = document.getElementsByClassName("normal")[0];
|
||||||
let torDiv = document.getElementsByClassName("tor")[0];
|
let torDiv = document.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalDiv.style.display = 'block';
|
normalDiv.style.display = 'block';
|
||||||
torDiv.style.display = 'none';
|
torDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
@ -66,34 +66,8 @@
|
|||||||
<option value="tor" data-localise="__MSG_tor__">Tor</option>
|
<option value="tor" data-localise="__MSG_tor__">Tor</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_enableCustomSettings__">Enable Custom Settings (will use cookies)</h4>
|
|
||||||
<input id="enable-custom-settings" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div id="proxiTok">
|
<div id="proxiTok">
|
||||||
<hr>
|
<hr>
|
||||||
<div class="custom-settings">
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h2>General</h2>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_theme__">Theme</h4>
|
|
||||||
<select class="theme">
|
|
||||||
<option value="default">Default</option>
|
|
||||||
<option value="card">Card</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h2>Api</h2>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_legacyMode__">Legacy mode</h4>
|
|
||||||
<select class="api-legacy">
|
|
||||||
<option value="on">On</option>
|
|
||||||
<option value="off">Off</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="normal">
|
<div class="normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
@ -4,24 +4,12 @@ import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
|||||||
let disable = document.getElementById("disable-tiktok");
|
let disable = document.getElementById("disable-tiktok");
|
||||||
let protocol = document.getElementById("protocol")
|
let protocol = document.getElementById("protocol")
|
||||||
|
|
||||||
let enableCustomSettings = document.getElementById("enable-custom-settings");
|
document.addEventListener("change", () => {
|
||||||
let customSettingsDiv = document.getElementsByClassName("custom-settings");
|
browser.storage.local.set({
|
||||||
|
|
||||||
let theme = document.getElementById('proxiTok').getElementsByClassName('theme')[0];
|
|
||||||
let api_legacy = document.getElementById('proxiTok').getElementsByClassName('api-legacy')[0];
|
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
|
||||||
await browser.storage.local.set({
|
|
||||||
disableTiktok: !disable.checked,
|
disableTiktok: !disable.checked,
|
||||||
tiktokProtocol: protocol.value,
|
tiktokProtocol: protocol.value,
|
||||||
|
|
||||||
enableTiktokCustomSettings: enableCustomSettings.checked,
|
|
||||||
|
|
||||||
proxiTokTheme: theme.value,
|
|
||||||
proxiTokApiLegacy: api_legacy.value,
|
|
||||||
|
|
||||||
});
|
});
|
||||||
changeProtocolSettings(protocol.value);
|
changeProtocolSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
window.onblur = tiktokHelper.initProxiTokCookies;
|
window.onblur = tiktokHelper.initProxiTokCookies;
|
||||||
@ -30,16 +18,11 @@ browser.storage.local.get(
|
|||||||
[
|
[
|
||||||
"disableTiktok",
|
"disableTiktok",
|
||||||
"tiktokProtocol",
|
"tiktokProtocol",
|
||||||
|
|
||||||
"enableTiktokCustomSettings",
|
|
||||||
|
|
||||||
"proxiTokTheme",
|
|
||||||
"proxiTokApiLegacy",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disable.checked = !r.disableTiktok;
|
disable.checked = !r.disableTiktok;
|
||||||
protocol.value = r.tiktokProtocol;
|
protocol.value = r.tiktokProtocol;
|
||||||
changeProtocolSettings(r.tiktokProtocol);
|
changeProtocolSettings();
|
||||||
let normalDiv = document.getElementsByClassName("normal")[0];
|
let normalDiv = document.getElementsByClassName("normal")[0];
|
||||||
let torDiv = document.getElementsByClassName("tor")[0];
|
let torDiv = document.getElementsByClassName("tor")[0];
|
||||||
if (r.tiktokProtocol == 'normal') {
|
if (r.tiktokProtocol == 'normal') {
|
||||||
@ -50,33 +33,20 @@ browser.storage.local.get(
|
|||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
enableCustomSettings.checked = r.enableTiktokCustomSettings;
|
|
||||||
if (r.enableTiktokCustomSettings)
|
|
||||||
customSettingsDiv.style.display = 'block';
|
|
||||||
else
|
|
||||||
customSettingsDiv.style.display = 'none';
|
|
||||||
|
|
||||||
theme.value = r.proxiTokTheme;
|
|
||||||
api_legacy.value = r.proxiTokApiLegacy;
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalDiv = document.getElementsByClassName("normal")[0];
|
let normalDiv = document.getElementsByClassName("normal")[0];
|
||||||
let torDiv = document.getElementsByClassName("tor")[0];
|
let torDiv = document.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalDiv.style.display = 'block';
|
normalDiv.style.display = 'block';
|
||||||
torDiv.style.display = 'none';
|
torDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
if (enableCustomSettings.checked)
|
|
||||||
for (const item of customSettingsDiv) item.style.display = 'block';
|
|
||||||
else
|
|
||||||
for (const item of customSettingsDiv) item.style.display = 'none';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
commonHelper.processDefaultCustomInstances('tiktok', 'proxiTok', 'normal', document);
|
commonHelper.processDefaultCustomInstances('tiktok', 'proxiTok', 'normal', document);
|
||||||
|
@ -17,30 +17,9 @@ body.option(dir="auto")
|
|||||||
select#protocol
|
select#protocol
|
||||||
option(value="normal" data-localise="__MSG_normal__") Normal
|
option(value="normal" data-localise="__MSG_normal__") Normal
|
||||||
option(value="tor" data-localise="__MSG_tor__") Tor
|
option(value="tor" data-localise="__MSG_tor__") Tor
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enableCustomSettings__") Enable Custom Settings (will use cookies)
|
|
||||||
input#enable-custom-settings(type="checkbox")
|
|
||||||
|
|
||||||
#proxiTok
|
#proxiTok
|
||||||
hr
|
hr
|
||||||
.custom-settings
|
|
||||||
.some-block.option-block
|
|
||||||
h2 General
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_theme__") Theme
|
|
||||||
select.theme
|
|
||||||
option(value="default") Default
|
|
||||||
option(value="card") Card
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h2 Api
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_legacyMode__") Legacy mode
|
|
||||||
select.api-legacy
|
|
||||||
option(value="on") On
|
|
||||||
option(value="off") Off
|
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://proxitok.com')
|
+instances('https://proxitok.com')
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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 class="selected" href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a class="selected" href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
@ -75,243 +75,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div id="simplyTranslate">
|
<div id="simplyTranslate">
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_from__">From</h4>
|
|
||||||
<select class="from">
|
|
||||||
<option value="auto">Auto</option>
|
|
||||||
<option value="af">Afrikaans</option>
|
|
||||||
<option value="sq">Albanian</option>
|
|
||||||
<option value="am">Amharic</option>
|
|
||||||
<option value="ar">Arabic</option>
|
|
||||||
<option value="hy">Armenian</option>
|
|
||||||
<option value="az">Azerbaijani</option>
|
|
||||||
<option value="eu">Basque</option>
|
|
||||||
<option value="be">Belarusian</option>
|
|
||||||
<option value="bn">Bengali</option>
|
|
||||||
<option value="bs">Bosnian</option>
|
|
||||||
<option value="bg">Bulgarian</option>
|
|
||||||
<option value="ca">Catalan</option>
|
|
||||||
<option value="ceb">Cebuano</option>
|
|
||||||
<option value="ny">Chichewa</option>
|
|
||||||
<option value="zh-CN">Chinese</option>
|
|
||||||
<option value="co">Corsican</option>
|
|
||||||
<option value="hr">Croatian</option>
|
|
||||||
<option value="cs">Czech</option>
|
|
||||||
<option value="da">Danish</option>
|
|
||||||
<option value="nl">Dutch</option>
|
|
||||||
<option value="en">English</option>
|
|
||||||
<option value="eo">Esperanto</option>
|
|
||||||
<option value="et">Estonian</option>
|
|
||||||
<option value="tl">Filipino</option>
|
|
||||||
<option value="fi">Finnish</option>
|
|
||||||
<option value="fr">French</option>
|
|
||||||
<option value="fy">Frisian</option>
|
|
||||||
<option value="gl">Galician</option>
|
|
||||||
<option value="ka">Georgian</option>
|
|
||||||
<option value="de">German</option>
|
|
||||||
<option value="el">Greek</option>
|
|
||||||
<option value="gu">Gujarati</option>
|
|
||||||
<option value="ht">Haitian Creole</option>
|
|
||||||
<option value="ha">Hausa</option>
|
|
||||||
<option value="haw">Hawaiian</option>
|
|
||||||
<option value="iw">Hebrew</option>
|
|
||||||
<option value="hi">Hindi</option>
|
|
||||||
<option value="hmn">Hmong</option>
|
|
||||||
<option value="hu">Hungarian</option>
|
|
||||||
<option value="is">Icelandic</option>
|
|
||||||
<option value="ig">Igbo</option>
|
|
||||||
<option value="id">Indonesian</option>
|
|
||||||
<option value="ga">Irish</option>
|
|
||||||
<option value="it">Italian</option>
|
|
||||||
<option value="ja">Japanese</option>
|
|
||||||
<option value="jw">Javanese</option>
|
|
||||||
<option value="kn">Kannada</option>
|
|
||||||
<option value="kk">Kazakh</option>
|
|
||||||
<option value="km">Khmer</option>
|
|
||||||
<option value="rw">Kinyarwanda</option>
|
|
||||||
<option value="ko">Korean</option>
|
|
||||||
<option value="ku">Kurdish (Kurmanji)</option>
|
|
||||||
<option value="ky">Kyrgyz</option>
|
|
||||||
<option value="lo">Lao</option>
|
|
||||||
<option value="la">Latin</option>
|
|
||||||
<option value="lv">Latvian</option>
|
|
||||||
<option value="lt">Lithuanian</option>
|
|
||||||
<option value="lb">Luxembourgish</option>
|
|
||||||
<option value="mk">Macedonian</option>
|
|
||||||
<option value="mg">Malagasy</option>
|
|
||||||
<option value="ms">Malay</option>
|
|
||||||
<option value="ml">Malayalam</option>
|
|
||||||
<option value="mt">Maltese</option>
|
|
||||||
<option value="mi">Maori</option>
|
|
||||||
<option value="mr">Marathi</option>
|
|
||||||
<option value="mn">Mongolian</option>
|
|
||||||
<option value="my">Myanmar (Burmese)</option>
|
|
||||||
<option value="ne">Nepali</option>
|
|
||||||
<option value="no">Norwegian</option>
|
|
||||||
<option value="or">Odia (Oriya)</option>
|
|
||||||
<option value="ps">Pashto</option>
|
|
||||||
<option value="fa">Persian</option>
|
|
||||||
<option value="pl">Polish</option>
|
|
||||||
<option value="pt">Portuguese</option>
|
|
||||||
<option value="pa">Punjabi</option>
|
|
||||||
<option value="ro">Romanian</option>
|
|
||||||
<option value="ru">Russian</option>
|
|
||||||
<option value="sm">Samoan</option>
|
|
||||||
<option value="gd">Scots Gaelic</option>
|
|
||||||
<option value="sr">Serbian</option>
|
|
||||||
<option value="st">Sesotho</option>
|
|
||||||
<option value="sn">Shona</option>
|
|
||||||
<option value="sd">Sindhi</option>
|
|
||||||
<option value="si">Sinhala</option>
|
|
||||||
<option value="sk">Slovak</option>
|
|
||||||
<option value="sl">Slovenian</option>
|
|
||||||
<option value="so">Somali</option>
|
|
||||||
<option value="es">Spanish</option>
|
|
||||||
<option value="su">Sundanese</option>
|
|
||||||
<option value="sw">Swahili</option>
|
|
||||||
<option value="sv">Swedish</option>
|
|
||||||
<option value="tg">Tajik</option>
|
|
||||||
<option value="ta">Tamil</option>
|
|
||||||
<option value="tt">Tatar</option>
|
|
||||||
<option value="te">Telugu</option>
|
|
||||||
<option value="th">Thai</option>
|
|
||||||
<option value="tr">Turkish</option>
|
|
||||||
<option value="tk">Turkmen</option>
|
|
||||||
<option value="uk">Ukrainian</option>
|
|
||||||
<option value="ur">Urdu</option>
|
|
||||||
<option value="ug">Uyghur</option>
|
|
||||||
<option value="uz">Uzbek</option>
|
|
||||||
<option value="vi">Vietnamese</option>
|
|
||||||
<option value="cy">Welsh</option>
|
|
||||||
<option value="xh">Xhosa</option>
|
|
||||||
<option value="yi">Yiddish</option>
|
|
||||||
<option value="yo">Yoruba</option>
|
|
||||||
<option value="zu">Zulu</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_to__">To</h4>
|
|
||||||
<select class="to">
|
|
||||||
<option value="af">Afrikaans</option>
|
|
||||||
<option value="sq">Albanian</option>
|
|
||||||
<option value="am">Amharic</option>
|
|
||||||
<option value="ar">Arabic</option>
|
|
||||||
<option value="hy">Armenian</option>
|
|
||||||
<option value="az">Azerbaijani</option>
|
|
||||||
<option value="eu">Basque</option>
|
|
||||||
<option value="be">Belarusian</option>
|
|
||||||
<option value="bn">Bengali</option>
|
|
||||||
<option value="bs">Bosnian</option>
|
|
||||||
<option value="bg">Bulgarian</option>
|
|
||||||
<option value="ca">Catalan</option>
|
|
||||||
<option value="ceb">Cebuano</option>
|
|
||||||
<option value="ny">Chichewa</option>
|
|
||||||
<option value="zh-CN">Chinese</option>
|
|
||||||
<option value="co">Corsican</option>
|
|
||||||
<option value="hr">Croatian</option>
|
|
||||||
<option value="cs">Czech</option>
|
|
||||||
<option value="da">Danish</option>
|
|
||||||
<option value="nl">Dutch</option>
|
|
||||||
<option value="en">English</option>
|
|
||||||
<option value="eo">Esperanto</option>
|
|
||||||
<option value="et">Estonian</option>
|
|
||||||
<option value="tl">Filipino</option>
|
|
||||||
<option value="fi">Finnish</option>
|
|
||||||
<option value="fr">French</option>
|
|
||||||
<option value="fy">Frisian</option>
|
|
||||||
<option value="gl">Galician</option>
|
|
||||||
<option value="ka">Georgian</option>
|
|
||||||
<option value="de">German</option>
|
|
||||||
<option value="el">Greek</option>
|
|
||||||
<option value="gu">Gujarati</option>
|
|
||||||
<option value="ht">Haitian Creole</option>
|
|
||||||
<option value="ha">Hausa</option>
|
|
||||||
<option value="haw">Hawaiian</option>
|
|
||||||
<option value="iw">Hebrew</option>
|
|
||||||
<option value="hi">Hindi</option>
|
|
||||||
<option value="hmn">Hmong</option>
|
|
||||||
<option value="hu">Hungarian</option>
|
|
||||||
<option value="is">Icelandic</option>
|
|
||||||
<option value="ig">Igbo</option>
|
|
||||||
<option value="id">Indonesian</option>
|
|
||||||
<option value="ga">Irish</option>
|
|
||||||
<option value="it">Italian</option>
|
|
||||||
<option value="ja">Japanese</option>
|
|
||||||
<option value="jw">Javanese</option>
|
|
||||||
<option value="kn">Kannada</option>
|
|
||||||
<option value="kk">Kazakh</option>
|
|
||||||
<option value="km">Khmer</option>
|
|
||||||
<option value="rw">Kinyarwanda</option>
|
|
||||||
<option value="ko">Korean</option>
|
|
||||||
<option value="ku">Kurdish (Kurmanji)</option>
|
|
||||||
<option value="ky">Kyrgyz</option>
|
|
||||||
<option value="lo">Lao</option>
|
|
||||||
<option value="la">Latin</option>
|
|
||||||
<option value="lv">Latvian</option>
|
|
||||||
<option value="lt">Lithuanian</option>
|
|
||||||
<option value="lb">Luxembourgish</option>
|
|
||||||
<option value="mk">Macedonian</option>
|
|
||||||
<option value="mg">Malagasy</option>
|
|
||||||
<option value="ms">Malay</option>
|
|
||||||
<option value="ml">Malayalam</option>
|
|
||||||
<option value="mt">Maltese</option>
|
|
||||||
<option value="mi">Maori</option>
|
|
||||||
<option value="mr">Marathi</option>
|
|
||||||
<option value="mn">Mongolian</option>
|
|
||||||
<option value="my">Myanmar (Burmese)</option>
|
|
||||||
<option value="ne">Nepali</option>
|
|
||||||
<option value="no">Norwegian</option>
|
|
||||||
<option value="or">Odia (Oriya)</option>
|
|
||||||
<option value="ps">Pashto</option>
|
|
||||||
<option value="fa">Persian</option>
|
|
||||||
<option value="pl">Polish</option>
|
|
||||||
<option value="pt">Portuguese</option>
|
|
||||||
<option value="pa">Punjabi</option>
|
|
||||||
<option value="ro">Romanian</option>
|
|
||||||
<option value="ru">Russian</option>
|
|
||||||
<option value="sm">Samoan</option>
|
|
||||||
<option value="gd">Scots Gaelic</option>
|
|
||||||
<option value="sr">Serbian</option>
|
|
||||||
<option value="st">Sesotho</option>
|
|
||||||
<option value="sn">Shona</option>
|
|
||||||
<option value="sd">Sindhi</option>
|
|
||||||
<option value="si">Sinhala</option>
|
|
||||||
<option value="sk">Slovak</option>
|
|
||||||
<option value="sl">Slovenian</option>
|
|
||||||
<option value="so">Somali</option>
|
|
||||||
<option value="es">Spanish</option>
|
|
||||||
<option value="su">Sundanese</option>
|
|
||||||
<option value="sw">Swahili</option>
|
|
||||||
<option value="sv">Swedish</option>
|
|
||||||
<option value="tg">Tajik</option>
|
|
||||||
<option value="ta">Tamil</option>
|
|
||||||
<option value="tt">Tatar</option>
|
|
||||||
<option value="te">Telugu</option>
|
|
||||||
<option value="th">Thai</option>
|
|
||||||
<option value="tr">Turkish</option>
|
|
||||||
<option value="tk">Turkmen</option>
|
|
||||||
<option value="uk">Ukrainian</option>
|
|
||||||
<option value="ur">Urdu</option>
|
|
||||||
<option value="ug">Uyghur</option>
|
|
||||||
<option value="uz">Uzbek</option>
|
|
||||||
<option value="vi">Vietnamese</option>
|
|
||||||
<option value="cy">Welsh</option>
|
|
||||||
<option value="xh">Xhosa</option>
|
|
||||||
<option value="yi">Yiddish</option>
|
|
||||||
<option value="yo">Yoruba</option>
|
|
||||||
<option value="zu">Zulu</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_engine__">Engine</h4>
|
|
||||||
<select class="engine">
|
|
||||||
<option value="google">Google</option>
|
|
||||||
<option value="libre">Libre</option>
|
|
||||||
<option value="deepl">Deepl</option>
|
|
||||||
<option value="iciba">ICIBA</option>
|
|
||||||
<option value="reverso">Reverso</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="normal">
|
<div class="normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
@ -362,7 +125,7 @@
|
|||||||
<div class="checklist custom-checklist"></div>
|
<div class="checklist custom-checklist"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="lingva">
|
<div id="lingva">
|
||||||
<div class="normal">
|
<div class="normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
@ -1,51 +1,38 @@
|
|||||||
import translateHelper from "../../../assets/javascripts/helpers/translate/translate.js";
|
import translateHelper from "../../../assets/javascripts/helpers/translate/translate.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableElement = document.getElementById("disable-simplyTranslate");
|
let disable = document.getElementById("disable-simplyTranslate");
|
||||||
let simplyTranslateDivElement = document.getElementById("simplyTranslate");
|
let simplyTranslateDiv = document.getElementById("simplyTranslate");
|
||||||
let lingvaDivElement = document.getElementById("lingva");
|
let lingvaDiv = document.getElementById("lingva");
|
||||||
let translateFrontendElement = document.getElementById("translate-frontend");
|
let frontend = document.getElementById("translate-frontend");
|
||||||
let protocolElement = document.getElementById("protocol");
|
let protocol = document.getElementById("protocol");
|
||||||
|
|
||||||
function changeFrontendsSettings(frontend) {
|
|
||||||
if (frontend == 'simplyTranslate') {
|
function changeFrontendsSettings() {
|
||||||
simplyTranslateDivElement.style.display = 'block';
|
if (frontend.value == 'simplyTranslate') {
|
||||||
lingvaDivElement.style.display = 'none';
|
simplyTranslateDiv.style.display = 'block';
|
||||||
|
lingvaDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (frontend == 'lingva') {
|
else if (frontend.value == 'lingva') {
|
||||||
simplyTranslateDivElement.style.display = 'none';
|
simplyTranslateDiv.style.display = 'none';
|
||||||
lingvaDivElement.style.display = 'block';
|
lingvaDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
function changeProtocolSettings() {
|
||||||
await browser.storage.local.set({
|
|
||||||
translateDisable: !disableElement.checked,
|
|
||||||
translateFrontend: translateFrontendElement.value,
|
|
||||||
translateProtocol: protocolElement.value,
|
|
||||||
translateFrom: fromElement.value,
|
|
||||||
translateTo: toElement.value,
|
|
||||||
simplyTranslateEngine: simplyTranslateEngineElement.value,
|
|
||||||
})
|
|
||||||
changeProtocolSettings(protocolElement.value);
|
|
||||||
changeFrontendsSettings(translateFrontendElement.value);
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
|
||||||
let normalSimplyTranslateDiv = document.getElementById("simplyTranslate").getElementsByClassName("normal")[0];
|
let normalSimplyTranslateDiv = document.getElementById("simplyTranslate").getElementsByClassName("normal")[0];
|
||||||
let torSimplyTranslateDiv = document.getElementById("simplyTranslate").getElementsByClassName("tor")[0];
|
let torSimplyTranslateDiv = document.getElementById("simplyTranslate").getElementsByClassName("tor")[0];
|
||||||
|
|
||||||
let normalLingvaDiv = document.getElementById("lingva").getElementsByClassName("normal")[0];
|
let normalLingvaDiv = document.getElementById("lingva").getElementsByClassName("normal")[0];
|
||||||
let torLingvaDiv = document.getElementById("lingva").getElementsByClassName("tor")[0];
|
let torLingvaDiv = document.getElementById("lingva").getElementsByClassName("tor")[0];
|
||||||
|
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalSimplyTranslateDiv.style.display = 'block';
|
normalSimplyTranslateDiv.style.display = 'block';
|
||||||
normalLingvaDiv.style.display = 'block';
|
normalLingvaDiv.style.display = 'block';
|
||||||
torLingvaDiv.style.display = 'none';
|
torLingvaDiv.style.display = 'none';
|
||||||
torSimplyTranslateDiv.style.display = 'none';
|
torSimplyTranslateDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalSimplyTranslateDiv.style.display = 'none';
|
normalSimplyTranslateDiv.style.display = 'none';
|
||||||
normalLingvaDiv.style.display = 'none';
|
normalLingvaDiv.style.display = 'none';
|
||||||
torLingvaDiv.style.display = 'block';
|
torLingvaDiv.style.display = 'block';
|
||||||
@ -53,35 +40,32 @@ function changeProtocolSettings(protocol) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let fromElement = document.getElementsByClassName("from")[0];
|
|
||||||
let toElement = document.getElementsByClassName("to")[0];
|
|
||||||
let simplyTranslateElement = document.getElementById("simplyTranslate")
|
|
||||||
let simplyTranslateEngineElement = simplyTranslateElement.getElementsByClassName("engine")[0];
|
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"translateDisable",
|
"translateDisable",
|
||||||
"translateFrontend",
|
"translateFrontend",
|
||||||
"translateProtocol",
|
"translateProtocol",
|
||||||
"translateFrom",
|
|
||||||
"translateTo",
|
|
||||||
"simplyTranslateEngine",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableElement.checked = !r.translateDisable;
|
disable.checked = !r.translateDisable;
|
||||||
|
frontend.value = r.translateFrontend;
|
||||||
translateFrontendElement.value = r.translateFrontend;
|
protocol.value = r.translateProtocol;
|
||||||
changeFrontendsSettings(r.translateFrontend);
|
changeFrontendsSettings();
|
||||||
|
changeProtocolSettings();
|
||||||
protocolElement.value = r.translateProtocol;
|
|
||||||
changeProtocolSettings(r.translateProtocol);
|
|
||||||
|
|
||||||
fromElement.value = r.translateFrom;
|
|
||||||
toElement.value = r.translateTo;
|
|
||||||
simplyTranslateEngineElement.value = r.simplyTranslateEngine;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
document.addEventListener("change", () => {
|
||||||
|
browser.storage.local.set({
|
||||||
|
translateDisable: !disable.checked,
|
||||||
|
translateFrontend: frontend.value,
|
||||||
|
translateProtocol: protocol.value,
|
||||||
|
})
|
||||||
|
changeProtocolSettings();
|
||||||
|
changeFrontendsSettings();
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
commonHelper.processDefaultCustomInstances('translate', 'simplyTranslate', 'normal', document)
|
commonHelper.processDefaultCustomInstances('translate', 'simplyTranslate', 'normal', document)
|
||||||
commonHelper.processDefaultCustomInstances('translate', 'simplyTranslate', 'tor', document);
|
commonHelper.processDefaultCustomInstances('translate', 'simplyTranslate', 'tor', document);
|
||||||
commonHelper.processDefaultCustomInstances('translate', 'lingva', 'normal', document);
|
commonHelper.processDefaultCustomInstances('translate', 'lingva', 'normal', document);
|
||||||
|
@ -25,28 +25,7 @@ body.option(dir="auto")
|
|||||||
option(value="tor" data-localise="__MSG_tor__") Tor
|
option(value="tor" data-localise="__MSG_tor__") Tor
|
||||||
|
|
||||||
hr
|
hr
|
||||||
|
|
||||||
#simplyTranslate
|
#simplyTranslate
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_from__") From
|
|
||||||
select.from
|
|
||||||
option(value="auto") Auto
|
|
||||||
include ../../widgets/from-to.pug
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_to__") To
|
|
||||||
select.to
|
|
||||||
include ../../widgets/from-to.pug
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_engine__") Engine
|
|
||||||
select.engine
|
|
||||||
option(value="google") Google
|
|
||||||
option(value="libre") Libre
|
|
||||||
option(value="deepl") Deepl
|
|
||||||
option(value="iciba") ICIBA
|
|
||||||
option(value="reverso") Reverso
|
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://simplytranslate.org')
|
+instances('https://simplytranslate.org')
|
||||||
@ -55,9 +34,7 @@ body.option(dir="auto")
|
|||||||
.tor
|
.tor
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('http://hxecvvetgrznmprg.onion')
|
+instances('http://hxecvvetgrznmprg.onion')
|
||||||
|
#lingva
|
||||||
#lingva
|
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://lingvatranslate.com')
|
+instances('https://lingvatranslate.com')
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
@ -64,92 +64,10 @@
|
|||||||
<select id="protocol">
|
<select id="protocol">
|
||||||
<option value="normal" data-localise="__MSG_normal__">Normal</option>
|
<option value="normal" data-localise="__MSG_normal__">Normal</option>
|
||||||
<option value="tor" data-localise="__MSG_tor__">Tor</option>
|
<option value="tor" data-localise="__MSG_tor__">Tor</option>
|
||||||
<option value="i2p" data-localise="__MSG_i2p__">I2P</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="some-block option-block">
|
<div id="nitter">
|
||||||
<h4 data-localise="__MSG_bypassTwitter__">Bypass "Open in Twitter"</h4>
|
<hr>
|
||||||
<input id="bypass-watch-on-twitter" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_enableCustomNitter__">Enable Custom Settings (will use cookies)</h4>
|
|
||||||
<input id="enable-twitter-custom-settings" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div id="nitter">
|
|
||||||
<div class="custom-settings">
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h2>Display </h2>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_theme__">Theme</h4>
|
|
||||||
<select class="theme">
|
|
||||||
<option value="Auto">Auto</option>
|
|
||||||
<option value="Auto (Twitter)">Auto (Twitter)</option>
|
|
||||||
<option value="Black">Black</option>
|
|
||||||
<option value="Mastodon">Mastodon</option>
|
|
||||||
<option value="Nitter">Nitter</option>
|
|
||||||
<option value="Pleroma">Pleroma</option>
|
|
||||||
<option value="Twitter">Twitter</option>
|
|
||||||
<option value="Twitter Dark">Twitter Dark</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_infiniteScroll__">Infinite scrolling (experimental, requires JavaScript)</h4>
|
|
||||||
<input class="infiniteScroll" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_stickyProfile__">Make profile sidebar stick to top</h4>
|
|
||||||
<input class="stickyProfile" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_bidiSupport__">Support bidirectional text (makes clicking on tweets harder)</h4>
|
|
||||||
<input class="bidiSupport" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_hideTweetStats__">Hide tweet stats (replies, retweets, likes)</h4>
|
|
||||||
<input class="hideTweetStats" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_hideBanner__">Hide profile banner</h4>
|
|
||||||
<input class="hideBanner" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_hidePins__">Hide pinned tweets</h4>
|
|
||||||
<input class="hidePins" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_hideReplies__">Hide tweet replies</h4>
|
|
||||||
<input class="hideReplies" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_squareAvatars__">Square profile pictures</h4>
|
|
||||||
<input class="squareAvatars" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h2>Media</h2>
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_mp4Playback__">Enable mp4 video playback (only for gifs)</h4>
|
|
||||||
<input class="mp4Playback" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_hlsPlayback__">Enable hls video streaming (requires JavaScript)</h4>
|
|
||||||
<input class="hlsPlayback" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_proxyVideos__">Proxy video streaming through the server (might be slow)</h4>
|
|
||||||
<input class="proxyVideos" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_muteVideos__">Mute videos by default</h4>
|
|
||||||
<input class="muteVideos" type="checkbox">
|
|
||||||
</div>
|
|
||||||
<div class="some-block option-block">
|
|
||||||
<h4 data-localise="__MSG_autoplayGifs__">Autoplay gifs</h4>
|
|
||||||
<input class="autoplayGifs" type="checkbox">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="normal">
|
<div class="normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
@ -1,124 +1,54 @@
|
|||||||
import twitterHelper from "../../../assets/javascripts/helpers/twitter.js";
|
import twitterHelper from "../../../assets/javascripts/helpers/twitter.js";
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableTwitterElement = document.getElementById("disable-nitter");
|
let disable = document.getElementById("disable-nitter");
|
||||||
let customSettingsDivElement = document.getElementsByClassName("custom-settings");
|
let protocol = document.getElementById("protocol");
|
||||||
let protocolElement = document.getElementById("protocol");
|
|
||||||
let enableYoutubeCustomSettingsElement = document.getElementById("enable-twitter-custom-settings");
|
|
||||||
let bypassWatchOnTwitterElement = document.getElementById("bypass-watch-on-twitter");
|
|
||||||
|
|
||||||
let theme = document.getElementById('nitter').getElementsByClassName("theme")[0];
|
let nitterDiv = document.getElementById('nitter');
|
||||||
let infiniteScroll = document.getElementById('nitter').getElementsByClassName("infiniteScroll")[0];
|
|
||||||
let stickyProfile = document.getElementById('nitter').getElementsByClassName('stickyProfile')[0];
|
const nitterForm = nitterDiv.getElementsByTagName('form')[0];
|
||||||
let bidiSupport = document.getElementById('nitter').getElementsByClassName('bidiSupport')[0];
|
const nitterCookies = nitterForm.getElementsByTagName('input')[0];
|
||||||
let hideTweetStats = document.getElementById('nitter').getElementsByClassName('hideTweetStats')[0];
|
nitterForm.addEventListener('submit', event => {
|
||||||
let hideBanner = document.getElementById('nitter').getElementsByClassName('hideBanner')[0];
|
event.preventDefault();
|
||||||
let hidePins = document.getElementById('nitter').getElementsByClassName('hidePins')[0];
|
const url = new URL(nitterCookies.value);
|
||||||
let hideReplies = document.getElementById('nitter').getElementsByClassName('hideReplies')[0];
|
twitterHelper.initNitterCookies(url);
|
||||||
let squareAvatars = document.getElementById('nitter').getElementsByClassName('squareAvatars')[0];
|
});
|
||||||
let mp4Playback = document.getElementById('nitter').getElementsByClassName('mp4Playback')[0];
|
|
||||||
let hlsPlayback = document.getElementById('nitter').getElementsByClassName('hlsPlayback')[0];
|
|
||||||
let proxyVideos = document.getElementById('nitter').getElementsByClassName('proxyVideos')[0];
|
|
||||||
let muteVideos = document.getElementById('nitter').getElementsByClassName('muteVideos')[0];
|
|
||||||
let autoplayGifs = document.getElementById('nitter').getElementsByClassName('autoplayGifs')[0];
|
|
||||||
let nitterElement = document.getElementById("nitter");
|
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disableTwitter",
|
"disableTwitter",
|
||||||
"twitterProtocol",
|
"twitterProtocol",
|
||||||
"enableTwitterCustomSettings",
|
|
||||||
"bypassWatchOnTwitter",
|
|
||||||
"nitterTheme",
|
|
||||||
"nitterInfiniteScroll",
|
|
||||||
"nitterStickyProfile",
|
|
||||||
"nitterBidiSupport",
|
|
||||||
"nitterHideTweetStats",
|
|
||||||
"nitterHideBanner",
|
|
||||||
"nitterHidePins",
|
|
||||||
"nitterHideReplies",
|
|
||||||
"nitterSquareAvatars",
|
|
||||||
"nitterMp4Playback",
|
|
||||||
"nitterHlsPlayback",
|
|
||||||
"nitterProxyVideos",
|
|
||||||
"nitterMuteVideos",
|
|
||||||
"nitterAutoplayGifs",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableTwitterElement.checked = !r.disableTwitter;
|
disable.checked = !r.disableTwitter;
|
||||||
enableYoutubeCustomSettingsElement.checked = r.enableTwitterCustomSettings;
|
protocol.value = r.twitterProtocol;
|
||||||
bypassWatchOnTwitterElement.checked = r.bypassWatchOnTwitter;
|
changeProtocolSettings();
|
||||||
protocolElement.value = r.twitterProtocol;
|
|
||||||
changeProtocolSettings(r.twitterProtocol);
|
|
||||||
|
|
||||||
// Display
|
|
||||||
theme.value = r.nitterTheme;
|
|
||||||
infiniteScroll.checked = r.nitterInfiniteScroll;
|
|
||||||
stickyProfile.checked = r.nitterStickyProfile;
|
|
||||||
bidiSupport.checked = r.nitterBidiSupport;
|
|
||||||
hideTweetStats.checked = r.nitterHideTweetStats;
|
|
||||||
hideBanner.checked = r.nitterHideBanner;
|
|
||||||
hidePins.checked = r.nitterHidePins;
|
|
||||||
hideReplies.checked = r.nitterHideReplies;
|
|
||||||
squareAvatars.checked = r.nitterSquareAvatars;
|
|
||||||
|
|
||||||
// Media
|
|
||||||
mp4Playback.checked = r.nitterMp4Playback;
|
|
||||||
hlsPlayback.checked = r.nitterHlsPlayback;
|
|
||||||
proxyVideos.checked = r.nitterProxyVideos;
|
|
||||||
muteVideos.checked = r.nitterMuteVideos;
|
|
||||||
autoplayGifs.checked = r.nitterAutoplayGifs;
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", () => {
|
||||||
await browser.storage.local.set({
|
browser.storage.local.set({
|
||||||
disableTwitter: !disableTwitterElement.checked,
|
disableTwitter: !disable.checked,
|
||||||
twitterProtocol: protocolElement.value,
|
twitterProtocol: protocol.value,
|
||||||
enableTwitterCustomSettings: enableYoutubeCustomSettingsElement.checked,
|
|
||||||
bypassWatchOnTwitter: bypassWatchOnTwitterElement.checked,
|
|
||||||
|
|
||||||
// Display
|
|
||||||
nitterTheme: theme.value,
|
|
||||||
nitterInfiniteScroll: infiniteScroll.checked,
|
|
||||||
nitterStickyProfile: stickyProfile.checked,
|
|
||||||
nitterBidiSupport: bidiSupport.checked,
|
|
||||||
nitterHideTweetStats: hideTweetStats.checked,
|
|
||||||
nitterHideBanner: hideBanner.checked,
|
|
||||||
nitterHidePins: hidePins.checked,
|
|
||||||
nitterHideReplies: hideReplies.checked,
|
|
||||||
nitterSquareAvatars: squareAvatars.checked,
|
|
||||||
|
|
||||||
// Media
|
|
||||||
nitterMp4Playback: mp4Playback.checked,
|
|
||||||
nitterHlsPlayback: hlsPlayback.checked,
|
|
||||||
nitterProxyVideos: proxyVideos.checked,
|
|
||||||
nitterMuteVideos: muteVideos.checked,
|
|
||||||
nitterAutoplayGifs: autoplayGifs.checked,
|
|
||||||
});
|
});
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeProtocolSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalDiv = nitterElement.getElementsByClassName("normal")[0];
|
let normalDiv = nitterDiv.getElementsByClassName("normal")[0];
|
||||||
let torDiv = nitterElement.getElementsByClassName("tor")[0];
|
let torDiv = nitterDiv.getElementsByClassName("tor")[0];
|
||||||
if (protocol == 'normal') {
|
if (protocol.value == 'normal') {
|
||||||
normalDiv.style.display = 'block';
|
normalDiv.style.display = 'block';
|
||||||
torDiv.style.display = 'none';
|
torDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protocol.value == 'tor') {
|
||||||
normalDiv.style.display = 'none';
|
normalDiv.style.display = 'none';
|
||||||
torDiv.style.display = 'block';
|
torDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
if (enableYoutubeCustomSettingsElement.checked)
|
|
||||||
for (const item of customSettingsDivElement) item.style.display = 'block';
|
|
||||||
else
|
|
||||||
for (const item of customSettingsDivElement) item.style.display = 'none';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
commonHelper.processDefaultCustomInstances('twitter', 'nitter', 'normal', document);
|
commonHelper.processDefaultCustomInstances('twitter', 'nitter', 'normal', document);
|
||||||
commonHelper.processDefaultCustomInstances('twitter', 'nitter', 'tor', document)
|
commonHelper.processDefaultCustomInstances('twitter', 'nitter', 'tor', document)
|
||||||
window.onblur = twitterHelper.initNitterCookies;
|
|
||||||
|
|
||||||
let latencyElement = document.getElementById("latency");
|
let latencyElement = document.getElementById("latency");
|
||||||
let latencyLabel = document.getElementById("latency-label");
|
let latencyLabel = document.getElementById("latency-label");
|
||||||
|
@ -17,90 +17,9 @@ body.option(dir="auto")
|
|||||||
select#protocol
|
select#protocol
|
||||||
option(value="normal" data-localise="__MSG_normal__") Normal
|
option(value="normal" data-localise="__MSG_normal__") Normal
|
||||||
option(value="tor" data-localise="__MSG_tor__") Tor
|
option(value="tor" data-localise="__MSG_tor__") Tor
|
||||||
option(value="i2p" data-localise="__MSG_i2p__") I2P
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_bypassTwitter__") Bypass "Open in Twitter"
|
|
||||||
input#bypass-watch-on-twitter(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enableCustomNitter__") Enable Custom Settings (will use cookies)
|
|
||||||
input#enable-twitter-custom-settings(type="checkbox")
|
|
||||||
|
|
||||||
#nitter
|
|
||||||
.custom-settings
|
|
||||||
.some-block.option-block
|
|
||||||
h2 Display
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_theme__") Theme
|
|
||||||
select.theme
|
|
||||||
option(value="Auto") Auto
|
|
||||||
option(value="Auto (Twitter)") Auto (Twitter)
|
|
||||||
option(value="Black") Black
|
|
||||||
option(value="Mastodon") Mastodon
|
|
||||||
option(value="Nitter") Nitter
|
|
||||||
option(value="Pleroma") Pleroma
|
|
||||||
option(value="Twitter") Twitter
|
|
||||||
option(value="Twitter Dark") Twitter Dark
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_infiniteScroll__") Infinite scrolling (experimental, requires JavaScript)
|
|
||||||
input.infiniteScroll(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_stickyProfile__") Make profile sidebar stick to top
|
|
||||||
input.stickyProfile(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_bidiSupport__") Support bidirectional text (makes clicking on tweets harder)
|
|
||||||
input.bidiSupport(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_hideTweetStats__") Hide tweet stats (replies, retweets, likes)
|
|
||||||
input.hideTweetStats(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_hideBanner__") Hide profile banner
|
|
||||||
input.hideBanner(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_hidePins__") Hide pinned tweets
|
|
||||||
input.hidePins(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_hideReplies__") Hide tweet replies
|
|
||||||
input.hideReplies(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_squareAvatars__") Square profile pictures
|
|
||||||
input.squareAvatars(type="checkbox")
|
|
||||||
|
|
||||||
hr
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h2 Media
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_mp4Playback__") Enable mp4 video playback (only for gifs)
|
|
||||||
input.mp4Playback(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_hlsPlayback__") Enable hls video streaming (requires JavaScript)
|
|
||||||
input.hlsPlayback(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_proxyVideos__") Proxy video streaming through the server (might be slow)
|
|
||||||
input.proxyVideos(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_muteVideos__") Mute videos by default
|
|
||||||
input.muteVideos(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_autoplayGifs__") Autoplay gifs
|
|
||||||
input.autoplayGifs(type="checkbox")
|
|
||||||
|
|
||||||
|
#nitter
|
||||||
|
hr
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://nitter.com')
|
+instances('https://nitter.com')
|
||||||
@ -112,7 +31,7 @@ body.option(dir="auto")
|
|||||||
.i2p
|
.i2p
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://nitter.i2p')
|
+instances('https://nitter.i2p')
|
||||||
|
|
||||||
|
|
||||||
script(type="module" src="../init.js")
|
script(type="module" src="../init.js")
|
||||||
script(type="module" src="./twitter.js")
|
script(type="module" src="./twitter.js")
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a class="selected" href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a class="selected" href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,177 +0,0 @@
|
|||||||
import youtubeHelper from "../../../assets/javascripts/helpers/youtube/youtube.js";
|
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
|
||||||
|
|
||||||
let invidious = document.getElementById('invidious');
|
|
||||||
let alwaysProxy = invidious.getElementsByClassName("local")[0];
|
|
||||||
let playerStyle = invidious.getElementsByClassName("player_style")[0];
|
|
||||||
let quality = invidious.getElementsByClassName("quality")[0];
|
|
||||||
let videoLoop = invidious.getElementsByClassName("video_loop")[0];
|
|
||||||
let continueAutoplay = invidious.getElementsByClassName("continue_autoplay")[0];
|
|
||||||
let invidiousContinue = invidious.getElementsByClassName("continue")[0];
|
|
||||||
let youtubeListen = invidious.getElementsByClassName("listen")[0];
|
|
||||||
let speed = invidious.getElementsByClassName("speed")[0];
|
|
||||||
let qualityDash = invidious.getElementsByClassName("quality_dash")[0];
|
|
||||||
let relatedVideo = invidious.getElementsByClassName("related_videos")[0];
|
|
||||||
let annotations = invidious.getElementsByClassName("annotations")[0];
|
|
||||||
let extendDesc = invidious.getElementsByClassName("extend_desc")[0];
|
|
||||||
let vrMode = invidious.getElementsByClassName("vr_mode")[0];
|
|
||||||
let savePlayerPos = invidious.getElementsByClassName("save_player_pos")[0];
|
|
||||||
let comments0 = invidious.getElementsByClassName("comments[0]")[0];
|
|
||||||
let comments1 = invidious.getElementsByClassName("comments[1]")[0];
|
|
||||||
let captions0 = invidious.getElementsByClassName("captions[0]")[0];
|
|
||||||
let captions1 = invidious.getElementsByClassName("captions[1]")[0];
|
|
||||||
let captions2 = invidious.getElementsByClassName("captions[2]")[0];
|
|
||||||
let autoplay = invidious.getElementsByClassName("youtubeAutoplay")[0];
|
|
||||||
let volume = invidious.getElementsByClassName("volume")[0];
|
|
||||||
let volumeValue = invidious.getElementsByClassName("volume-value")[0];
|
|
||||||
let region = invidious.getElementsByClassName("region")[0];
|
|
||||||
let darkMode = invidious.getElementsByClassName("dark_mode")[0];
|
|
||||||
let thin_mode = invidious.getElementsByClassName("thin_mode")[0];
|
|
||||||
let default_home = invidious.getElementsByClassName("default_home")[0];
|
|
||||||
let feed_menu0 = invidious.getElementsByClassName("feed_menu[0]")[0];
|
|
||||||
let feed_menu1 = invidious.getElementsByClassName("feed_menu[1]")[0];
|
|
||||||
|
|
||||||
volume.addEventListener("input", () => volumeValue.textContent = `${volume.value}%`);
|
|
||||||
|
|
||||||
invidious.addEventListener("change", async _ => {
|
|
||||||
browser.storage.local.get(
|
|
||||||
[
|
|
||||||
"invidiousComments",
|
|
||||||
"invidiousCaptions",
|
|
||||||
"invidiousFeedMenuList",
|
|
||||||
],
|
|
||||||
async r => {
|
|
||||||
let commentsList = r.invidiousComments;
|
|
||||||
commentsList[0] = comments0.value;
|
|
||||||
commentsList[1] = comments1.value;
|
|
||||||
|
|
||||||
let captionsList = r.invidiousCaptions;
|
|
||||||
captionsList[0] = captions0.value;
|
|
||||||
captionsList[1] = captions1.value;
|
|
||||||
captionsList[2] = captions2.value;
|
|
||||||
|
|
||||||
let feedMenuList = r.invidiousFeedMenuList;
|
|
||||||
feedMenuList[0] = feed_menu0.value;
|
|
||||||
feedMenuList[1] = feed_menu1.value;
|
|
||||||
|
|
||||||
await browser.storage.local.set({
|
|
||||||
invidiousAlwaysProxy: alwaysProxy.checked,
|
|
||||||
youtubeAutoplay: autoplay.checked,
|
|
||||||
invidiousPlayerStyle: playerStyle.value,
|
|
||||||
invidiousQuality: quality.value,
|
|
||||||
invidiousVideoLoop: videoLoop.checked,
|
|
||||||
invidiousContinueAutoplay: continueAutoplay.checked,
|
|
||||||
invidiousContinue: invidiousContinue.checked,
|
|
||||||
youtubeListen: youtubeListen.checked,
|
|
||||||
invidiousSpeed: speed.value,
|
|
||||||
invidiousQualityDash: qualityDash.value,
|
|
||||||
youtubeVolume: volume.value,
|
|
||||||
invidiousComments: commentsList,
|
|
||||||
invidiousCaptions: captionsList,
|
|
||||||
invidiousRelatedVideos: relatedVideo.checked,
|
|
||||||
invidiousAnnotations: annotations.checked,
|
|
||||||
invidiousExtendDesc: extendDesc.checked,
|
|
||||||
invidiousVrMode: vrMode.checked,
|
|
||||||
invidiousSavePlayerPos: savePlayerPos.checked,
|
|
||||||
|
|
||||||
invidiousRegion: region.value,
|
|
||||||
invidiousDarkMode: darkMode.value,
|
|
||||||
invidiousThinMode: thin_mode.checked,
|
|
||||||
invidiousDefaultHome: default_home.value,
|
|
||||||
invidiousFeedMenuList: feedMenuList,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
browser.storage.local.get(
|
|
||||||
[
|
|
||||||
"youtubeListen",
|
|
||||||
"youtubeVolume",
|
|
||||||
"youtubeAutoplay",
|
|
||||||
"invidiousQuality",
|
|
||||||
"invidiousAlwaysProxy",
|
|
||||||
"invidiousQuality",
|
|
||||||
"invidiousPlayerStyle",
|
|
||||||
"invidiousVideoLoop",
|
|
||||||
"invidiousContinueAutoplay",
|
|
||||||
"invidiousContinue",
|
|
||||||
"invidiousSpeed",
|
|
||||||
"invidiousQualityDash",
|
|
||||||
"invidiousComments",
|
|
||||||
"invidiousCaptions",
|
|
||||||
"invidiousRelatedVideos",
|
|
||||||
"invidiousAnnotations",
|
|
||||||
"invidiousExtendDesc",
|
|
||||||
"invidiousVrMode",
|
|
||||||
"invidiousSavePlayerPos",
|
|
||||||
"invidiousRegion",
|
|
||||||
"invidiousDarkMode",
|
|
||||||
"invidiousThinMode",
|
|
||||||
"invidiousDefaultHome",
|
|
||||||
"invidiousFeedMenuList",
|
|
||||||
],
|
|
||||||
r => {
|
|
||||||
videoLoop.checked = r.invidiousVideoLoop;
|
|
||||||
autoplay.checked = r.youtubeAutoplay;
|
|
||||||
playerStyle.value = r.invidiousPlayerStyle;
|
|
||||||
|
|
||||||
continueAutoplay.checked = r.invidiousContinueAutoplay;
|
|
||||||
invidiousContinue.checked = r.invidiousContinue;
|
|
||||||
alwaysProxy.checked = r.invidiousAlwaysProxy;
|
|
||||||
youtubeListen.checked = r.youtubeListen;
|
|
||||||
|
|
||||||
speed.value = r.invidiousSpeed;
|
|
||||||
quality.value = r.invidiousQuality;
|
|
||||||
qualityDash.value = r.invidiousQualityDash;
|
|
||||||
|
|
||||||
volume.value = r.youtubeVolume;
|
|
||||||
volumeValue.textContent = `${r.youtubeVolume}%`;
|
|
||||||
|
|
||||||
comments0.value = r.invidiousComments[0];
|
|
||||||
comments1.value = r.invidiousComments[1];
|
|
||||||
|
|
||||||
captions0.value = r.invidiousCaptions[0];
|
|
||||||
captions1.value = r.invidiousCaptions[1];
|
|
||||||
captions2.value = r.invidiousCaptions[2];
|
|
||||||
|
|
||||||
relatedVideo.checked = r.invidiousRelatedVideos;
|
|
||||||
annotations.checked = r.invidiousAnnotations;
|
|
||||||
extendDesc.checked = r.invidiousExtendDesc;
|
|
||||||
vrMode.checked = r.invidiousVrMode;
|
|
||||||
savePlayerPos.checked = r.invidiousSavePlayerPos;
|
|
||||||
|
|
||||||
region.value = r.invidiousRegion;
|
|
||||||
darkMode.value = r.invidiousDarkMode;
|
|
||||||
thin_mode.checked = r.invidiousThinMode;
|
|
||||||
default_home.value = r.invidiousDefaultHome;
|
|
||||||
|
|
||||||
feed_menu0.value = r.invidiousFeedMenuList[0];
|
|
||||||
feed_menu1.value = r.invidiousFeedMenuList[1];
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube', 'invidious', 'normal', document);
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube', 'invidious', 'tor', document);
|
|
||||||
|
|
||||||
|
|
||||||
let latencyInvidiousElement = document.getElementById("latency-invidious");
|
|
||||||
let latencyInvidiousLabel = document.getElementById("latency-invidious-label");
|
|
||||||
latencyInvidiousElement.addEventListener("click",
|
|
||||||
async () => {
|
|
||||||
let reloadWindow = () => location.reload();
|
|
||||||
latencyInvidiousElement.addEventListener("click", reloadWindow);
|
|
||||||
await youtubeHelper.init();
|
|
||||||
let redirects = youtubeHelper.getRedirects();
|
|
||||||
const oldHtml = latencyInvidiousLabel.innerHTML;
|
|
||||||
latencyInvidiousLabel.innerHTML = '...';
|
|
||||||
commonHelper.testLatency(latencyInvidiousLabel, redirects.invidious.normal).then(r => {
|
|
||||||
browser.storage.local.set({ invidiousLatency: r });
|
|
||||||
latencyInvidiousLabel.innerHTML = oldHtml;
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube', 'invidious', 'normal', document);
|
|
||||||
latencyInvidiousElement.removeEventListener("click", reloadWindow);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,152 +0,0 @@
|
|||||||
import youtubeHelper from "../../../assets/javascripts/helpers/youtube/youtube.js";
|
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
|
||||||
|
|
||||||
let piped = document.getElementById('piped');
|
|
||||||
|
|
||||||
let pipedListen = piped.getElementsByClassName("listen")[0];
|
|
||||||
let pipedQuality = piped.getElementsByClassName("quality")[0];
|
|
||||||
let pipedBufferGoal = piped.getElementsByClassName("bufferGoal")[0];
|
|
||||||
let pipedRegion = piped.getElementsByClassName("region")[0];
|
|
||||||
let pipedHomepage = piped.getElementsByClassName("homepage")[0];
|
|
||||||
let pipedComments = piped.getElementsByClassName("comments")[0];
|
|
||||||
let pipedMinimizeDescription = piped.getElementsByClassName("minimizeDescription")[0];
|
|
||||||
let pipedWatchHistory = piped.getElementsByClassName("watchHistory")[0];
|
|
||||||
let pipedDisableLBRY = piped.getElementsByClassName("disableLBRY")[0];
|
|
||||||
let pipedProxyLBRY = piped.getElementsByClassName("proxyLBRY")[0];
|
|
||||||
|
|
||||||
let pipedSelectedSkipSponsor = piped.getElementsByClassName("selectedSkip-sponsor")[0];
|
|
||||||
let pipedSelectedSkipIntro = piped.getElementsByClassName("selectedSkip-intro")[0];
|
|
||||||
let pipedSelectedSkipOutro = piped.getElementsByClassName("selectedSkip-outro")[0];
|
|
||||||
let pipedSelectedSkipPreview = piped.getElementsByClassName("selectedSkip-preview")[0];
|
|
||||||
let pipedSelectedSkipInteraction = piped.getElementsByClassName("selectedSkip-interaction")[0];
|
|
||||||
let pipedSelectedSkipSelfpromo = piped.getElementsByClassName("selectedSkip-selfpromo")[0];
|
|
||||||
let pipedSelectedSkipMusicOfftopic = piped.getElementsByClassName("selectedSkip-music_offtopic")[0];
|
|
||||||
let pipedSelectedSkipPoiHighlight = piped.getElementsByClassName("selectedSkip-poi_highlight")[0];
|
|
||||||
let pipedSelectedSkipFiller = piped.getElementsByClassName("selectedSkip-filler")[0];
|
|
||||||
|
|
||||||
let pipedDdlTheme = piped.getElementsByClassName("ddlTheme")[0];
|
|
||||||
let pipedSponsorblock = piped.getElementsByClassName("sponsorblock")[0];
|
|
||||||
let pipedEnabledCodecs = piped.getElementsByClassName("enabledCodecs")[0];
|
|
||||||
let autoplay = piped.getElementsByClassName("youtubeAutoplay")[0];
|
|
||||||
|
|
||||||
let volume = piped.getElementsByClassName("volume")[0];
|
|
||||||
let volumeValue = piped.getElementsByClassName("volume-value")[0];
|
|
||||||
|
|
||||||
volume.addEventListener("input", () => volumeValue.textContent = `${volume.value}%`);
|
|
||||||
function selectSkipModify(value, boolean) {
|
|
||||||
if (boolean && !selectSkip.includes(value)) {
|
|
||||||
selectSkip.push(value);
|
|
||||||
}
|
|
||||||
else if (!boolean) {
|
|
||||||
let i = selectSkip.indexOf(value);
|
|
||||||
if (i > -1) selectSkip.splice(i, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let selectSkip = [];
|
|
||||||
piped.addEventListener("change", async () => {
|
|
||||||
let pipedEnabledCodecsResult = [];
|
|
||||||
for (const opt of pipedEnabledCodecs.options)
|
|
||||||
if (opt.selected) pipedEnabledCodecsResult.push(opt.value);
|
|
||||||
|
|
||||||
selectSkipModify('sponsor', pipedSelectedSkipSponsor.checked);
|
|
||||||
selectSkipModify('intro', pipedSelectedSkipIntro.checked);
|
|
||||||
selectSkipModify('outro', pipedSelectedSkipOutro.checked);
|
|
||||||
selectSkipModify('preview', pipedSelectedSkipPreview.checked);
|
|
||||||
selectSkipModify('interaction', pipedSelectedSkipInteraction.checked);
|
|
||||||
selectSkipModify('selfpromo', pipedSelectedSkipSelfpromo.checked);
|
|
||||||
selectSkipModify('music_offtopic', pipedSelectedSkipMusicOfftopic.checked);
|
|
||||||
selectSkipModify('poi_highlight', pipedSelectedSkipPoiHighlight.checked);
|
|
||||||
selectSkipModify('filler', pipedSelectedSkipFiller.checked);
|
|
||||||
|
|
||||||
await browser.storage.local.set({
|
|
||||||
pipedQuality: pipedQuality.value,
|
|
||||||
pipedBufferGoal: pipedBufferGoal.value,
|
|
||||||
pipedRegion: pipedRegion.value,
|
|
||||||
pipedHomepage: pipedHomepage.value,
|
|
||||||
pipedComments: pipedComments.checked,
|
|
||||||
pipedMinimizeDescription: pipedMinimizeDescription.checked,
|
|
||||||
youtubeAutoplay: autoplay.checked,
|
|
||||||
pipedWatchHistory: pipedWatchHistory.checked,
|
|
||||||
pipedDisableLBRY: pipedDisableLBRY.checked,
|
|
||||||
pipedProxyLBRY: pipedProxyLBRY.checked,
|
|
||||||
youtubeVolume: volume.value,
|
|
||||||
pipedSponsorblock: pipedSponsorblock.checked,
|
|
||||||
pipedDdlTheme: pipedDdlTheme.value,
|
|
||||||
pipedEnabledCodecs: pipedEnabledCodecsResult,
|
|
||||||
youtubeListen: pipedListen.checked,
|
|
||||||
pipedSelectedSkip: selectSkip,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
await browser.storage.local.get(
|
|
||||||
[
|
|
||||||
"youtubeVolume",
|
|
||||||
"youtubeAutoplay",
|
|
||||||
"youtubeListen",
|
|
||||||
|
|
||||||
"pipedBufferGoal",
|
|
||||||
"pipedComments",
|
|
||||||
"pipedDisableLBRY",
|
|
||||||
"pipedEnabledCodecs",
|
|
||||||
"pipedHomepage",
|
|
||||||
"pipedMinimizeDescription",
|
|
||||||
"pipedProxyLBRY",
|
|
||||||
"pipedQuality",
|
|
||||||
"pipedRegion",
|
|
||||||
"pipedSelectedSkip",
|
|
||||||
"pipedSponsorblock",
|
|
||||||
"pipedDdlTheme",
|
|
||||||
"pipedWatchHistory",
|
|
||||||
],
|
|
||||||
r => {
|
|
||||||
pipedSponsorblock.checked = r.pipedSponsorblock;
|
|
||||||
pipedDdlTheme.value = r.pipedDdlTheme;
|
|
||||||
selectSkip = r.pipedSelectedSkip;
|
|
||||||
pipedSelectedSkipSponsor.checked = selectSkip.includes('sponsor');
|
|
||||||
pipedSelectedSkipIntro.checked = selectSkip.includes('intro');
|
|
||||||
pipedSelectedSkipOutro.checked = selectSkip.includes('outro');
|
|
||||||
pipedSelectedSkipPreview.checked = selectSkip.includes('preview');
|
|
||||||
autoplay.checked = r.youtubeAutoplay;
|
|
||||||
pipedSelectedSkipInteraction.checked = selectSkip.includes('interaction');
|
|
||||||
pipedSelectedSkipSelfpromo.checked = selectSkip.includes('selfpromo');
|
|
||||||
pipedSelectedSkipMusicOfftopic.checked = selectSkip.includes('music_offtopic');
|
|
||||||
pipedSelectedSkipPoiHighlight.checked = selectSkip.includes('poi_highlight');
|
|
||||||
pipedSelectedSkipFiller.checked = selectSkip.includes('filler');
|
|
||||||
pipedListen.checked = r.youtubeListen;
|
|
||||||
pipedQuality.value = r.pipedQuality;
|
|
||||||
pipedBufferGoal.value = r.pipedBufferGoal;
|
|
||||||
pipedRegion.value = r.pipedRegion;
|
|
||||||
pipedHomepage.value = r.pipedHomepage;
|
|
||||||
pipedComments.checked = r.pipedComments;
|
|
||||||
pipedMinimizeDescription.checked = r.pipedMinimizeDescription;
|
|
||||||
pipedWatchHistory.checked = r.pipedWatchHistory;
|
|
||||||
pipedEnabledCodecs.value = r.pipedEnabledCodecs;
|
|
||||||
pipedDisableLBRY.checked = r.pipedDisableLBRY;
|
|
||||||
pipedProxyLBRY.checked = r.pipedProxyLBRY;
|
|
||||||
|
|
||||||
volume.value = r.youtubeVolume;
|
|
||||||
volumeValue.textContent = `${r.youtubeVolume}%`;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube', 'piped', 'normal', document);
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube', 'piped', 'tor', document);
|
|
||||||
|
|
||||||
let latencyPipedElement = document.getElementById("latency-piped");
|
|
||||||
let latencyPipedLabel = document.getElementById("latency-piped-label");
|
|
||||||
latencyPipedElement.addEventListener("click",
|
|
||||||
async () => {
|
|
||||||
let reloadWindow = () => location.reload();
|
|
||||||
latencyPipedElement.addEventListener("click", reloadWindow);
|
|
||||||
await youtubeHelper.init();
|
|
||||||
let redirects = youtubeHelper.getRedirects();
|
|
||||||
const oldHtml = latencyPipedLabel.innerHTML;
|
|
||||||
latencyPipedLabel.innerHTML = '...';
|
|
||||||
commonHelper.testLatency(latencyPipedLabel, redirects.piped.normal).then(r => {
|
|
||||||
browser.storage.local.set({ pipedLatency: r });
|
|
||||||
latencyPipedLabel.innerHTML = oldHtml;
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube', 'piped', 'normal', document);
|
|
||||||
latencyPipedElement.removeEventListener("click", reloadWindow);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,125 +0,0 @@
|
|||||||
import youtubeHelper from "../../../assets/javascripts/helpers/youtube/youtube.js";
|
|
||||||
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
|
||||||
|
|
||||||
let pipedMaterialElement = document.getElementById('pipedMaterial');
|
|
||||||
let listenElement = pipedMaterialElement.getElementsByClassName("listen")[0];
|
|
||||||
let disableLBRYElement = pipedMaterialElement.getElementsByClassName("disableLBRY")[0];
|
|
||||||
let proxyLBRYElement = pipedMaterialElement.getElementsByClassName("proxyLBRY")[0];
|
|
||||||
let sponsorblockElement = pipedMaterialElement.getElementsByClassName("sponsorblock")[0];
|
|
||||||
let skipToLastPointElement = pipedMaterialElement.getElementsByClassName("skipToLastPoint")[0];
|
|
||||||
|
|
||||||
let selectedSkipSponsorElement = pipedMaterialElement.getElementsByClassName("selectedSkip-sponsor")[0];
|
|
||||||
let selectedSkipIntroElement = pipedMaterialElement.getElementsByClassName("selectedSkip-intro")[0];
|
|
||||||
let selectedSkipOutroElement = pipedMaterialElement.getElementsByClassName("selectedSkip-outro")[0];
|
|
||||||
let selectedSkipPreviewElement = pipedMaterialElement.getElementsByClassName("selectedSkip-preview")[0];
|
|
||||||
let selectedSkipInteractionElement = pipedMaterialElement.getElementsByClassName("selectedSkip-interaction")[0];
|
|
||||||
let selectedSkipSelfpromoElement = pipedMaterialElement.getElementsByClassName("selectedSkip-selfpromo")[0];
|
|
||||||
let selectedSkipMusicOfftopicElement = pipedMaterialElement.getElementsByClassName("selectedSkip-music_offtopic")[0];
|
|
||||||
|
|
||||||
let autoplayElement = pipedMaterialElement.getElementsByClassName("youtubeAutoplay")[0];
|
|
||||||
|
|
||||||
let volumeElement = pipedMaterialElement.getElementsByClassName("volume")[0];
|
|
||||||
let volumeValueElement = pipedMaterialElement.getElementsByClassName("volume-value")[0];
|
|
||||||
|
|
||||||
volumeElement.addEventListener("input", () => volumeValueElement.textContent = `${volumeElement.value}%`);
|
|
||||||
|
|
||||||
let selectSkip = [];
|
|
||||||
function selectSkipModify(value, boolean) {
|
|
||||||
if (boolean && !selectSkip.includes(value)) {
|
|
||||||
selectSkip.push(value);
|
|
||||||
}
|
|
||||||
else if (!boolean) {
|
|
||||||
let i = selectSkip.indexOf(value);
|
|
||||||
if (i > -1) selectSkip.splice(i, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pipedMaterialElement.addEventListener("change", async () => {
|
|
||||||
console.log("changed piped settings");
|
|
||||||
|
|
||||||
selectSkipModify('sponsors', selectedSkipSponsorElement.checked);
|
|
||||||
selectSkipModify('intro', selectedSkipIntroElement.checked);
|
|
||||||
selectSkipModify('outro', selectedSkipOutroElement.checked);
|
|
||||||
selectSkipModify('preview', selectedSkipPreviewElement.checked);
|
|
||||||
selectSkipModify('interaction', selectedSkipInteractionElement.checked);
|
|
||||||
selectSkipModify('selfpromo', selectedSkipSelfpromoElement.checked);
|
|
||||||
selectSkipModify('music_offtopic', selectedSkipMusicOfftopicElement.checked);
|
|
||||||
|
|
||||||
await browser.storage.local.set({
|
|
||||||
youtubeListen: listenElement.checked,
|
|
||||||
pipedDisableLBRY: disableLBRYElement.checked,
|
|
||||||
pipedProxyLBRY: proxyLBRYElement.checked,
|
|
||||||
pipedSponsorblock: sponsorblockElement.checked,
|
|
||||||
pipedSkipToLastPoint: skipToLastPointElement.checked,
|
|
||||||
pipedSelectedSkipSponsor: selectedSkipSponsorElement.checked,
|
|
||||||
pipedSelectedSkipIntro: selectedSkipIntroElement.checked,
|
|
||||||
pipedSelectedSkipOutro: selectedSkipOutroElement.checked,
|
|
||||||
youtubeAutoplay: autoplayElement.checked,
|
|
||||||
youtubeVolume: volumeElement.value,
|
|
||||||
pipedSelectedSkipPreview: selectedSkipPreviewElement.checked,
|
|
||||||
pipedSelectedSkipInteraction: selectedSkipInteractionElement.checked,
|
|
||||||
pipedSelectedSkipSelfpromo: selectedSkipSelfpromoElement.checked,
|
|
||||||
pipedSelectedSkipMusicOfftopic: selectedSkipMusicOfftopicElement.checked,
|
|
||||||
|
|
||||||
pipedSponsorblock: sponsorblockElement.checked,
|
|
||||||
pipedMaterialSkipToLastPoint: skipToLastPointElement.checked,
|
|
||||||
pipedSelectedSkip: selectSkip,
|
|
||||||
});
|
|
||||||
init();
|
|
||||||
});
|
|
||||||
|
|
||||||
browser.storage.local.get(
|
|
||||||
[
|
|
||||||
"youtubeAutoplay",
|
|
||||||
"youtubeVolume",
|
|
||||||
"youtubeListen",
|
|
||||||
|
|
||||||
"pipedDisableLBRY",
|
|
||||||
"pipedProxyLBRY",
|
|
||||||
"pipedSelectedSkip",
|
|
||||||
"pipedSponsorblock",
|
|
||||||
|
|
||||||
"pipedMaterialSkipToLastPoint",
|
|
||||||
],
|
|
||||||
r => {
|
|
||||||
autoplayElement.checked = r.youtubeAutoplay;
|
|
||||||
|
|
||||||
listenElement.checked = r.youtubeListen;
|
|
||||||
disableLBRYElement.checked = r.pipedDisableLBRY;
|
|
||||||
proxyLBRYElement.checked = r.pipedProxyLBRY;
|
|
||||||
sponsorblockElement.checked = r.pipedSponsorblock;
|
|
||||||
skipToLastPointElement.checked = r.pipedMaterialSkipToLastPoint;
|
|
||||||
|
|
||||||
selectSkip = r.pipedSelectedSkip;
|
|
||||||
selectedSkipSponsorElement.checked = selectSkip.includes('sponsors');
|
|
||||||
selectedSkipIntroElement.checked = selectSkip.includes('intro');
|
|
||||||
selectedSkipOutroElement.checked = selectSkip.includes('outro');
|
|
||||||
selectedSkipPreviewElement.checked = selectSkip.includes('preview');
|
|
||||||
selectedSkipInteractionElement.checked = selectSkip.includes('interaction');
|
|
||||||
selectedSkipSelfpromoElement.checked = selectSkip.includes('selfpromo');
|
|
||||||
selectedSkipMusicOfftopicElement.checked = selectSkip.includes('music_offtopic');
|
|
||||||
|
|
||||||
volumeElement.value = r.youtubeVolume;
|
|
||||||
volumeValueElement.textContent = `${r.youtubeVolume}%`;
|
|
||||||
});
|
|
||||||
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube' ,'pipedMaterial', 'normal', document);
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube' ,'pipedMaterial', 'tor', document);
|
|
||||||
|
|
||||||
let latencyPipedMaterialElement = document.getElementById("latency-pipedMaterial");
|
|
||||||
let latencyPipedMaterialLabel = document.getElementById("latency-pipedMaterial-label");
|
|
||||||
latencyPipedMaterialElement.addEventListener("click",
|
|
||||||
async () => {
|
|
||||||
let reloadWindow = () => location.reload();
|
|
||||||
latencyPipedMaterialElement.addEventListener("click", reloadWindow);
|
|
||||||
await youtubeHelper.init();
|
|
||||||
let redirects = youtubeHelper.getRedirects();
|
|
||||||
const oldHtml = latencyPipedMaterialLabel.innerHTML;
|
|
||||||
latencyPipedMaterialLabel.innerHTML = '...';
|
|
||||||
commonHelper.testLatency(latencyPipedMaterialLabel, redirects.pipedMaterial.normal).then(r => {
|
|
||||||
browser.storage.local.set({ pipedMaterialLatency: r });
|
|
||||||
latencyPipedMaterialLabel.innerHTML = oldHtml;
|
|
||||||
commonHelper.processDefaultCustomInstances('youtube' ,'pipedMaterial', 'normal', document);
|
|
||||||
latencyPipedMaterialElement.removeEventListener("click", reloadWindow);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
File diff suppressed because it is too large
Load Diff
@ -1,79 +1,80 @@
|
|||||||
import youtubeHelper from "../../../assets/javascripts/helpers/youtube/youtube.js";
|
import youtubeHelper from "../../../assets/javascripts/helpers/youtube/youtube.js";
|
||||||
|
import commonHelper from "../../../assets/javascripts/helpers/common.js";
|
||||||
|
|
||||||
let disableYoutubeElement = document.getElementById("disable-invidious");
|
let disableYoutube = document.getElementById("disable-invidious");
|
||||||
let youtubeFrontendElement = document.getElementById("youtube-frontend");
|
let youtubeFrontend = document.getElementById("youtube-frontend");
|
||||||
let invidiousDivElement = document.getElementById("invidious");
|
let invidiousDiv = document.getElementById("invidious");
|
||||||
let pipedDivElement = document.getElementById("piped");
|
let pipedDiv = document.getElementById("piped");
|
||||||
let pipedMaterialDivElement = document.getElementById("pipedMaterial");
|
let pipedMaterialDiv = document.getElementById("pipedMaterial");
|
||||||
let freetubeYatteeDivElement = document.getElementById("freetube-yatte");
|
let freetubeYatteeDiv = document.getElementById("freetube-yatte");
|
||||||
let customSettingsDivElement = document.getElementsByClassName("custom-settings");
|
let youtubeEmbedFrontend = document.getElementById("youtube-embed-frontend");
|
||||||
let youtubeEmbedFrontendElement = document.getElementById("youtube-embed-frontend");
|
let OnlyEmbeddedVideo = document.getElementById("only-embed");
|
||||||
let enableYoutubeCustomSettingsElement = document.getElementById("enable-youtube-custom-settings");
|
let protoco = document.getElementById("protocol");
|
||||||
let OnlyEmbeddedVideoElement = document.getElementById("only-embed");
|
|
||||||
let bypassWatchOnYoutubeElement = document.getElementById("bypass-watch-on-youtube");
|
|
||||||
let protocolElement = document.getElementById("protocol");
|
|
||||||
|
|
||||||
function changeFrontendsSettings() {
|
function changeFrontendsSettings() {
|
||||||
let frontend = youtubeFrontendElement.value;
|
let frontend = youtubeFrontend.value;
|
||||||
|
|
||||||
if (enableYoutubeCustomSettingsElement.checked)
|
|
||||||
for (const item of customSettingsDivElement) item.style.display = 'block';
|
|
||||||
else
|
|
||||||
for (const item of customSettingsDivElement) item.style.display = 'none';
|
|
||||||
|
|
||||||
if (frontend == 'invidious') {
|
if (frontend == 'invidious') {
|
||||||
invidiousDivElement.style.display = 'block';
|
invidiousDiv.style.display = 'block';
|
||||||
pipedDivElement.style.display = 'none';
|
pipedDiv.style.display = 'none';
|
||||||
pipedMaterialDivElement.style.display = 'none';
|
pipedMaterialDiv.style.display = 'none';
|
||||||
freetubeYatteeDivElement.style.display = 'none';
|
freetubeYatteeDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (frontend == 'piped') {
|
else if (frontend == 'piped') {
|
||||||
invidiousDivElement.style.display = 'none';
|
invidiousDiv.style.display = 'none';
|
||||||
pipedDivElement.style.display = 'block';
|
pipedDiv.style.display = 'block';
|
||||||
pipedMaterialDivElement.style.display = 'none';
|
pipedMaterialDiv.style.display = 'none';
|
||||||
freetubeYatteeDivElement.style.display = 'none';
|
freetubeYatteeDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (frontend == 'pipedMaterial') {
|
else if (frontend == 'pipedMaterial') {
|
||||||
invidiousDivElement.style.display = 'none';
|
invidiousDiv.style.display = 'none';
|
||||||
pipedDivElement.style.display = 'none';
|
pipedDiv.style.display = 'none';
|
||||||
pipedMaterialDivElement.style.display = 'block';
|
pipedMaterialDiv.style.display = 'block';
|
||||||
freetubeYatteeDivElement.style.display = 'none';
|
freetubeYatteeDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (frontend == 'freetube' || frontend == 'yatte') {
|
else if (frontend == 'freetube' || frontend == 'yatte') {
|
||||||
invidiousDivElement.style.display = 'none';
|
invidiousDiv.style.display = 'none';
|
||||||
pipedDivElement.style.display = 'none';
|
pipedDiv.style.display = 'none';
|
||||||
pipedMaterialDivElement.style.display = 'none';
|
pipedMaterialDiv.style.display = 'none';
|
||||||
freetubeYatteeDivElement.style.display = 'block';
|
freetubeYatteeDiv.style.display = 'block';
|
||||||
changeYoutubeEmbedFrontendsSettings(youtubeHelper.getYoutubeEmbedFrontend());
|
changeYoutubeEmbedFrontendsSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeYoutubeEmbedFrontendsSettings(youtubeEmbedFrontend) {
|
function changeYoutubeEmbedFrontendsSettings() {
|
||||||
if (youtubeEmbedFrontend == 'invidious') {
|
if (youtubeEmbedFrontend.value == 'invidious') {
|
||||||
pipedDivElement.style.display = 'none';
|
pipedDiv.style.display = 'none';
|
||||||
invidiousDivElement.style.display = 'block';
|
pipedMaterialDiv.style.display = 'none';
|
||||||
|
invidiousDiv.style.display = 'block';
|
||||||
}
|
}
|
||||||
if (youtubeEmbedFrontend == 'piped') {
|
if (youtubeEmbedFrontend.value == 'piped') {
|
||||||
pipedDivElement.style.display = 'block';
|
pipedDiv.style.display = 'block';
|
||||||
invidiousDivElement.style.display = 'none';
|
pipedMaterialDiv.style.display = 'none';
|
||||||
|
invidiousDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (youtubeEmbedFrontend == 'youtube') {
|
if (youtubeEmbedFrontend.value == 'pipedMaterial') {
|
||||||
pipedDivElement.style.display = 'none';
|
pipedDiv.style.display = 'none';
|
||||||
invidiousDivElement.style.display = 'none';
|
pipedMaterialDiv.style.display = 'block';
|
||||||
|
invidiousDiv.style.display = 'none';
|
||||||
|
}
|
||||||
|
else if (youtubeEmbedFrontend.value == 'youtube') {
|
||||||
|
pipedDiv.style.display = 'none';
|
||||||
|
pipedMaterialDiv.style.display = 'none';
|
||||||
|
invidiousDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeProtocolSettings(protocol) {
|
function changeProtocolSettings() {
|
||||||
let normalPipedDiv = document.getElementById('piped').getElementsByClassName("normal")[0];
|
const normalPipedDiv = document.getElementById('piped').getElementsByClassName("normal")[0];
|
||||||
let torPipedDiv = document.getElementById('piped').getElementsByClassName("tor")[0];
|
const torPipedDiv = document.getElementById('piped').getElementsByClassName("tor")[0];
|
||||||
|
|
||||||
let normalPipedMaterialDiv = document.getElementById('pipedMaterial').getElementsByClassName("normal")[0];
|
const normalPipedMaterialDiv = document.getElementById('pipedMaterial').getElementsByClassName("normal")[0];
|
||||||
let torPipedMaterialDiv = document.getElementById('pipedMaterial').getElementsByClassName("tor")[0];
|
const torPipedMaterialDiv = document.getElementById('pipedMaterial').getElementsByClassName("tor")[0];
|
||||||
|
|
||||||
let normalInvidiousDiv = document.getElementById('invidious').getElementsByClassName("normal")[0];
|
const normalInvidiousDiv = document.getElementById('invidious').getElementsByClassName("normal")[0];
|
||||||
let torInvidiousDiv = document.getElementById('invidious').getElementsByClassName("tor")[0];
|
const torInvidiousDiv = document.getElementById('invidious').getElementsByClassName("tor")[0];
|
||||||
|
|
||||||
if (protocol == 'normal') {
|
if (protoco.value == 'normal') {
|
||||||
normalInvidiousDiv.style.display = 'block';
|
normalInvidiousDiv.style.display = 'block';
|
||||||
torInvidiousDiv.style.display = 'none';
|
torInvidiousDiv.style.display = 'none';
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ function changeProtocolSettings(protocol) {
|
|||||||
normalPipedMaterialDiv.style.display = 'block';
|
normalPipedMaterialDiv.style.display = 'block';
|
||||||
torPipedMaterialDiv.style.display = 'none';
|
torPipedMaterialDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (protocol == 'tor') {
|
else if (protoco.value == 'tor') {
|
||||||
normalInvidiousDiv.style.display = 'none';
|
normalInvidiousDiv.style.display = 'none';
|
||||||
torInvidiousDiv.style.display = 'block';
|
torInvidiousDiv.style.display = 'block';
|
||||||
|
|
||||||
@ -97,56 +98,118 @@ function changeProtocolSettings(protocol) {
|
|||||||
|
|
||||||
document.addEventListener("change", async () => {
|
document.addEventListener("change", async () => {
|
||||||
await browser.storage.local.set({
|
await browser.storage.local.set({
|
||||||
disableYoutube: !disableYoutubeElement.checked,
|
disableYoutube: !disableYoutube.checked,
|
||||||
youtubeFrontend: youtubeFrontendElement.value,
|
youtubeFrontend: youtubeFrontend.value,
|
||||||
youtubeEmbedFrontend: youtubeEmbedFrontendElement.value,
|
youtubeEmbedFrontend: youtubeEmbedFrontend.value,
|
||||||
enableYoutubeCustomSettings: enableYoutubeCustomSettingsElement.checked,
|
OnlyEmbeddedVideo: OnlyEmbeddedVideo.value,
|
||||||
OnlyEmbeddedVideo: OnlyEmbeddedVideoElement.value,
|
youtubeProtocol: protoco.value,
|
||||||
bypassWatchOnYoutube: bypassWatchOnYoutubeElement.checked,
|
|
||||||
youtubeProtocol: protocolElement.value,
|
|
||||||
})
|
})
|
||||||
changeYoutubeEmbedFrontendsSettings(youtubeEmbedFrontendElement.value);
|
changeProtocolSettings();
|
||||||
changeProtocolSettings(protocolElement.value);
|
changeYoutubeEmbedFrontendsSettings();
|
||||||
changeFrontendsSettings();
|
changeFrontendsSettings();
|
||||||
})
|
})
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disableYoutube",
|
"disableYoutube",
|
||||||
"enableYoutubeCustomSettings",
|
|
||||||
"OnlyEmbeddedVideo",
|
"OnlyEmbeddedVideo",
|
||||||
"youtubeRedirects",
|
"youtubeRedirects",
|
||||||
"youtubeFrontend",
|
"youtubeFrontend",
|
||||||
|
|
||||||
"alwaysUsePreferred",
|
|
||||||
"youtubeEmbedFrontend",
|
"youtubeEmbedFrontend",
|
||||||
"youtubeProtocol",
|
"youtubeProtocol",
|
||||||
"bypassWatchOnYoutube",
|
|
||||||
],
|
],
|
||||||
r => {
|
r => {
|
||||||
disableYoutubeElement.checked = !r.disableYoutube;
|
disableYoutube.checked = !r.disableYoutube;
|
||||||
enableYoutubeCustomSettingsElement.checked = r.enableYoutubeCustomSettings;
|
OnlyEmbeddedVideo.value = r.OnlyEmbeddedVideo;
|
||||||
|
youtubeFrontend.value = r.youtubeFrontend;
|
||||||
|
protoco.value = r.youtubeProtocol;
|
||||||
|
|
||||||
OnlyEmbeddedVideoElement.value = r.OnlyEmbeddedVideo;
|
|
||||||
bypassWatchOnYoutubeElement.checked = r.bypassWatchOnYoutube;
|
|
||||||
|
|
||||||
let frontend = r.youtubeFrontend;
|
|
||||||
youtubeFrontendElement.value = frontend;
|
|
||||||
changeFrontendsSettings();
|
changeFrontendsSettings();
|
||||||
|
changeProtocolSettings();
|
||||||
|
|
||||||
let protocol = r.youtubeProtocol;
|
youtubeEmbedFrontend.value = youtubeEmbedFrontend.value
|
||||||
protocolElement.value = protocol;
|
if (r.youtubeFrontend == "freetube" || r.youtubeFrontend == "yatte") changeYoutubeEmbedFrontendsSettings()
|
||||||
changeProtocolSettings(protocol);
|
|
||||||
|
|
||||||
let youtubeEmbedFrontend = r.youtubeEmbedFrontend;
|
|
||||||
youtubeEmbedFrontendElement.value = youtubeEmbedFrontend
|
|
||||||
if (frontend == "freetube" || frontend == "yatte") {
|
|
||||||
changeYoutubeEmbedFrontendsSettings(youtubeEmbedFrontend)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const invidiousForm = invidiousDiv.getElementsByTagName('form')[0];
|
||||||
|
const invidiousCookies = invidiousForm.getElementsByTagName('input')[0];
|
||||||
|
invidiousForm.addEventListener('submit', async event => {
|
||||||
|
event.preventDefault();
|
||||||
|
const url = new URL(invidiousCookies.value);
|
||||||
|
youtubeHelper.initInvidiousCookies(url);
|
||||||
|
});
|
||||||
|
|
||||||
window.onblur = () => {
|
// const pipedForm = pipedDiv.getElementsByTagName('form')[0];
|
||||||
youtubeHelper.initInvidiousCookies();
|
// const pipedCookies = pipedForm.getElementsByTagName('input')[0];
|
||||||
}
|
// pipedForm.addEventListener('submit', async event => {
|
||||||
|
// event.preventDefault();
|
||||||
|
// const url = new URL(pipedCookies.value);
|
||||||
|
// youtubeHelper.initPipedLocalStorage(url);
|
||||||
|
// });
|
||||||
|
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'invidious', 'normal', document);
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'invidious', 'tor', document);
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'pipedMaterial', 'normal', document);
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'pipedMaterial', 'tor', document);
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'piped', 'normal', document);
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'piped', 'tor', document);
|
||||||
|
|
||||||
|
|
||||||
|
let latencyInvidiousElement = document.getElementById("latency-invidious");
|
||||||
|
let latencyInvidiousLabel = document.getElementById("latency-invidious-label");
|
||||||
|
latencyInvidiousElement.addEventListener("click",
|
||||||
|
async () => {
|
||||||
|
let reloadWindow = () => location.reload();
|
||||||
|
latencyInvidiousElement.addEventListener("click", reloadWindow);
|
||||||
|
await youtubeHelper.init();
|
||||||
|
let redirects = youtubeHelper.getRedirects();
|
||||||
|
const oldHtml = latencyInvidiousLabel.innerHTML;
|
||||||
|
latencyInvidiousLabel.innerHTML = '...';
|
||||||
|
commonHelper.testLatency(latencyInvidiousLabel, redirects.invidious.normal).then(r => {
|
||||||
|
browser.storage.local.set({ invidiousLatency: r });
|
||||||
|
latencyInvidiousLabel.innerHTML = oldHtml;
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'invidious', 'normal', document);
|
||||||
|
latencyInvidiousElement.removeEventListener("click", reloadWindow);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
let latencyPipedMaterialElement = document.getElementById("latency-pipedMaterial");
|
||||||
|
let latencyPipedMaterialLabel = document.getElementById("latency-pipedMaterial-label");
|
||||||
|
latencyPipedMaterialElement.addEventListener("click",
|
||||||
|
async () => {
|
||||||
|
let reloadWindow = () => location.reload();
|
||||||
|
latencyPipedMaterialElement.addEventListener("click", reloadWindow);
|
||||||
|
await youtubeHelper.init();
|
||||||
|
let redirects = youtubeHelper.getRedirects();
|
||||||
|
const oldHtml = latencyPipedMaterialLabel.innerHTML;
|
||||||
|
latencyPipedMaterialLabel.innerHTML = '...';
|
||||||
|
commonHelper.testLatency(latencyPipedMaterialLabel, redirects.pipedMaterial.normal).then(r => {
|
||||||
|
browser.storage.local.set({ pipedMaterialLatency: r });
|
||||||
|
latencyPipedMaterialLabel.innerHTML = oldHtml;
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'pipedMaterial', 'normal', document);
|
||||||
|
latencyPipedMaterialElement.removeEventListener("click", reloadWindow);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
let latencyPipedElement = document.getElementById("latency-piped");
|
||||||
|
let latencyPipedLabel = document.getElementById("latency-piped-label");
|
||||||
|
latencyPipedElement.addEventListener("click",
|
||||||
|
async () => {
|
||||||
|
let reloadWindow = () => location.reload();
|
||||||
|
latencyPipedElement.addEventListener("click", reloadWindow);
|
||||||
|
await youtubeHelper.init();
|
||||||
|
let redirects = youtubeHelper.getRedirects();
|
||||||
|
const oldHtml = latencyPipedLabel.innerHTML;
|
||||||
|
latencyPipedLabel.innerHTML = '...';
|
||||||
|
commonHelper.testLatency(latencyPipedLabel, redirects.piped.normal).then(r => {
|
||||||
|
browser.storage.local.set({ pipedLatency: r });
|
||||||
|
latencyPipedLabel.innerHTML = oldHtml;
|
||||||
|
commonHelper.processDefaultCustomInstances('youtube', 'piped', 'normal', document);
|
||||||
|
latencyPipedElement.removeEventListener("click", reloadWindow);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
@ -21,8 +21,6 @@ body.option(dir="auto")
|
|||||||
option(value="freetube") FreeTube
|
option(value="freetube") FreeTube
|
||||||
option(value="yatte") Yattee
|
option(value="yatte") Yattee
|
||||||
|
|
||||||
hr
|
|
||||||
|
|
||||||
#freetube-yatte
|
#freetube-yatte
|
||||||
.some-block.option-block
|
.some-block.option-block
|
||||||
h4(data-localise="__MSG_embeddedVids__") Embedded Videos Frontend
|
h4(data-localise="__MSG_embeddedVids__") Embedded Videos Frontend
|
||||||
@ -31,7 +29,6 @@ body.option(dir="auto")
|
|||||||
option(value="piped") Piped
|
option(value="piped") Piped
|
||||||
option(value="pipedMaterial") Piped-Material
|
option(value="pipedMaterial") Piped-Material
|
||||||
option(value="youtube") Youtube
|
option(value="youtube") Youtube
|
||||||
hr
|
|
||||||
|
|
||||||
#invidious-piped-pipedMaterial
|
#invidious-piped-pipedMaterial
|
||||||
.some-block.option-block
|
.some-block.option-block
|
||||||
@ -47,278 +44,7 @@ body.option(dir="auto")
|
|||||||
option(value="onlyEmbedded" data-localise="__MSG_onlyEmbedded__") Only Embedded
|
option(value="onlyEmbedded" data-localise="__MSG_onlyEmbedded__") Only Embedded
|
||||||
option(value="onlyNotEmbedded" data-localise="__MSG_onlyNotEmbedded__") Only Not Embedded
|
option(value="onlyNotEmbedded" data-localise="__MSG_onlyNotEmbedded__") Only Not Embedded
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_bypassYoutube__") Bypass "Watch On YouTube"
|
|
||||||
input#bypass-watch-on-youtube(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enableCustom__") Enable Custom Settings (will use cookies and localStorage)
|
|
||||||
input#enable-youtube-custom-settings(type="checkbox")
|
|
||||||
|
|
||||||
#invidious
|
#invidious
|
||||||
.custom-settings
|
|
||||||
hr
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_alwaysLoop__") Always loop
|
|
||||||
input.video_loop(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_autoplayVid__") Autoplay Video
|
|
||||||
input.youtubeAutoplay(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_playNext__") Play next by default
|
|
||||||
input.continue(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_autoplayNext__") Autoplay next video
|
|
||||||
input.continue_autoplay(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_alwaysProxy__") Always proxy videos
|
|
||||||
input.local(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_listenByDefault__") Listen by default
|
|
||||||
input.listen(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_defaultSpeed__") Default speed
|
|
||||||
select.speed
|
|
||||||
option 2.0
|
|
||||||
option 1.75
|
|
||||||
option 1.5
|
|
||||||
option 1.25
|
|
||||||
option 1.0
|
|
||||||
option 0.75
|
|
||||||
option 0.5
|
|
||||||
option 0.25
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_prefQuality__") Preferred video quality
|
|
||||||
select.quality
|
|
||||||
option(value="hd720") 720p
|
|
||||||
option(value="medium") 480p
|
|
||||||
option(value="dash" data-localise="__MSG_dash__") DASH (adaptive quality)
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_prefDashQuality__") Preferred DASH video quality
|
|
||||||
select.quality_dash
|
|
||||||
option(value="auto" data-localise="__MSG_auto__") Auto
|
|
||||||
option(value="best" data-localise="__MSG_best__") Best
|
|
||||||
option(value="4320p") 4320p
|
|
||||||
option(value="2160p") 2160p
|
|
||||||
option(value="1440p") 1440p
|
|
||||||
option(value="1080p") 1080p
|
|
||||||
option(value="720p") 720p
|
|
||||||
option(value="480p") 480p
|
|
||||||
option(value="360p") 360p
|
|
||||||
option(value="240p") 240p
|
|
||||||
option(value="144p") 144p
|
|
||||||
option(value="worst" data-localise="__MSG_worst__") Worst
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4
|
|
||||||
x(data-localise="__MSG_volume__") Volume:
|
|
||||||
span.volume-value --%
|
|
||||||
input.volume(type="range" min="0" max="100" step="1")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_defaultComments__") Default comments
|
|
||||||
select(class="comments[0]")
|
|
||||||
option(value="" data-localise="__MSG_none__") none
|
|
||||||
option(value="youtube") YouTube
|
|
||||||
option(value="reddit") Reddit
|
|
||||||
.some-block.option-block
|
|
||||||
h4
|
|
||||||
select(class="comments[1]")
|
|
||||||
option(value="" data-localise="__MSG_none__") none
|
|
||||||
option(value="youtube") YouTube
|
|
||||||
option(value="reddit") Reddit
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_defaultCaptions__") Default captions
|
|
||||||
select(class="captions[0]")
|
|
||||||
include ../../widgets/captions_options.pug
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4
|
|
||||||
select(class="captions[1]")
|
|
||||||
include ../../widgets/captions_options.pug
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4
|
|
||||||
select(class="captions[2]")
|
|
||||||
include ../../widgets/captions_options.pug
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_showRelated__") Show related videos
|
|
||||||
input.related_videos(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_showAnnotations__") Show annotations by default
|
|
||||||
input.annotations(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_autoExtendDesc__") Automatically extend video description
|
|
||||||
input.extend_desc(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_interactive360__") Interactive 360 degree videos (requires WebGL)
|
|
||||||
input.vr_mode(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_savePlaybackPos__") Save playback position
|
|
||||||
input.save_player_pos(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_region__") Select country
|
|
||||||
select.region
|
|
||||||
option(value="AE") AE
|
|
||||||
option(value="AR") AR
|
|
||||||
option(value="AT") AT
|
|
||||||
option(value="AU") AU
|
|
||||||
option(value="AZ") AZ
|
|
||||||
option(value="BA") BA
|
|
||||||
option(value="BD") BD
|
|
||||||
option(value="BE") BE
|
|
||||||
option(value="BG") BG
|
|
||||||
option(value="BH") BH
|
|
||||||
option(value="BO") BO
|
|
||||||
option(value="BR") BR
|
|
||||||
option(value="BY") BY
|
|
||||||
option(value="CA") CA
|
|
||||||
option(value="CH") CH
|
|
||||||
option(value="CL") CL
|
|
||||||
option(value="CO") CO
|
|
||||||
option(value="CR") CR
|
|
||||||
option(value="CY") CY
|
|
||||||
option(value="CZ") CZ
|
|
||||||
option(value="DE") DE
|
|
||||||
option(value="DK") DK
|
|
||||||
option(value="DO") DO
|
|
||||||
option(value="DZ") DZ
|
|
||||||
option(value="EC") EC
|
|
||||||
option(value="EE") EE
|
|
||||||
option(value="EG") EG
|
|
||||||
option(value="ES") ES
|
|
||||||
option(value="FI") FI
|
|
||||||
option(value="FR") FR
|
|
||||||
option(value="GB") GB
|
|
||||||
option(value="GE") GE
|
|
||||||
option(value="GH") GH
|
|
||||||
option(value="GR") GR
|
|
||||||
option(value="GT") GT
|
|
||||||
option(value="HK") HK
|
|
||||||
option(value="HN") HN
|
|
||||||
option(value="HR") HR
|
|
||||||
option(value="HU") HU
|
|
||||||
option(value="ID") ID
|
|
||||||
option(value="IE") IE
|
|
||||||
option(value="IL") IL
|
|
||||||
option(value="IN") IN
|
|
||||||
option(value="IQ") IQ
|
|
||||||
option(value="IS") IS
|
|
||||||
option(value="IT") IT
|
|
||||||
option(value="JM") JM
|
|
||||||
option(value="JO") JO
|
|
||||||
option(value="JP") JP
|
|
||||||
option(value="KE") KE
|
|
||||||
option(value="KR") KR
|
|
||||||
option(value="KW") KW
|
|
||||||
option(value="KZ") KZ
|
|
||||||
option(value="LB") LB
|
|
||||||
option(value="LI") LI
|
|
||||||
option(value="LK") LK
|
|
||||||
option(value="LT") LT
|
|
||||||
option(value="LU") LU
|
|
||||||
option(value="LV") LV
|
|
||||||
option(value="LY") LY
|
|
||||||
option(value="MA") MA
|
|
||||||
option(value="ME") ME
|
|
||||||
option(value="MK") MK
|
|
||||||
option(value="MT") MT
|
|
||||||
option(value="MX") MX
|
|
||||||
option(value="MY") MY
|
|
||||||
option(value="NG") NG
|
|
||||||
option(value="NI") NI
|
|
||||||
option(value="NL") NL
|
|
||||||
option(value="NO") NO
|
|
||||||
option(value="NP") NP
|
|
||||||
option(value="NZ") NZ
|
|
||||||
option(value="OM") OM
|
|
||||||
option(value="PA") PA
|
|
||||||
option(value="PE") PE
|
|
||||||
option(value="PG") PG
|
|
||||||
option(value="PH") PH
|
|
||||||
option(value="PK") PK
|
|
||||||
option(value="PL") PL
|
|
||||||
option(value="PR") PR
|
|
||||||
option(value="PT") PT
|
|
||||||
option(value="PY") PY
|
|
||||||
option(value="QA") QA
|
|
||||||
option(value="RO") RO
|
|
||||||
option(value="RS") RS
|
|
||||||
option(value="RU") RU
|
|
||||||
option(value="SA") SA
|
|
||||||
option(value="SE") SE
|
|
||||||
option(value="SG") SG
|
|
||||||
option(value="SI") SI
|
|
||||||
option(value="SK") SK
|
|
||||||
option(value="SN") SN
|
|
||||||
option(value="SV") SV
|
|
||||||
option(value="TH") TH
|
|
||||||
option(value="TN") TN
|
|
||||||
option(value="TR") TR
|
|
||||||
option(value="TW") TW
|
|
||||||
option(value="TZ") TZ
|
|
||||||
option(value="UA") UA
|
|
||||||
option(value="UG") UG
|
|
||||||
option(value="US") US
|
|
||||||
option(value="UY") UY
|
|
||||||
option(value="VE") VE
|
|
||||||
option(value="VN") VN
|
|
||||||
option(value="YE") YE
|
|
||||||
option(value="ZA") ZA
|
|
||||||
option(value="ZW") ZW
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_playerStyle__") Player Style
|
|
||||||
select.player_style
|
|
||||||
option(value="invidious" data-localise="__MSG_invidious__") Invidious
|
|
||||||
option(value="youtube" data-localise="__MSG_youtube__") YouTube
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_theme__") Theme
|
|
||||||
select.dark_mode
|
|
||||||
option(value="") auto
|
|
||||||
option(value="light") light
|
|
||||||
option(value="dark") dark
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_thin_mode__") Thin mode
|
|
||||||
input.thin_mode(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_default_home__") Default homepage
|
|
||||||
select.default_home
|
|
||||||
option(value="") Search
|
|
||||||
option(value="Popular") Popular
|
|
||||||
option(value="Trending") Trending
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_feedMenu__") Feed menu
|
|
||||||
select(class="feed_menu[0]")
|
|
||||||
option(value="") Search
|
|
||||||
option(value="Popular") Popular
|
|
||||||
option(value="Trending") Trending
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
select(class="feed_menu[1]")
|
|
||||||
option(value="") Search
|
|
||||||
option(value="Popular") Popular
|
|
||||||
option(value="Trending") Trending
|
|
||||||
hr
|
hr
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
@ -331,318 +57,6 @@ body.option(dir="auto")
|
|||||||
|
|
||||||
#piped
|
#piped
|
||||||
hr
|
hr
|
||||||
.custom-settings
|
|
||||||
hr
|
|
||||||
.some-block.option-block
|
|
||||||
h4
|
|
||||||
x(data-localise="__MSG_volume__") Volume:
|
|
||||||
span.volume-value --%
|
|
||||||
input.volume(type="range" min="0" max="100" step="1")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enableSponsorBlock__") Enable Sponsorblock
|
|
||||||
input.sponsorblock(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipSponsors__") Skip Sponsors
|
|
||||||
input.selectedSkip-sponsor(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipIntermission__") Skip Intermission/Intro Animation
|
|
||||||
input.selectedSkip-intro(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skripEndcars__") Skip Endcards/Credits
|
|
||||||
input.selectedSkip-outro(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skripPreview__") Skip Preview/Recap
|
|
||||||
input.selectedSkip-preview(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipReminder__") Skip Interaction Reminder (Subscribe)
|
|
||||||
input.selectedSkip-interaction(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipUnpaidPromo__") Skip Unpaid/Self Promotion(Subscribe)
|
|
||||||
input.selectedSkip-selfpromo(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipMusic__") Skip Music: Non-Music Section(Subscribe)
|
|
||||||
input.selectedSkip-music_offtopic(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipHighlight__") Skip Highlight(Subscribe)
|
|
||||||
input.selectedSkip-poi_highlight(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipFiller__") Skip Filler Tangent
|
|
||||||
input.selectedSkip-filler(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_theme__") Theme
|
|
||||||
select.ddlTheme
|
|
||||||
option(value="auto") Auto
|
|
||||||
option(value="dark") Dark
|
|
||||||
option(value="light") Light
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_autoplayVid__") Autoplay Video
|
|
||||||
input.youtubeAutoplay(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_audioOnly__") Audio Only
|
|
||||||
input.listen(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_defaultQuality__") Default Quality
|
|
||||||
select.quality
|
|
||||||
option(value="0") Auto
|
|
||||||
option(value="144") 144p
|
|
||||||
option(value="240") 240p
|
|
||||||
option(value="360") 360p
|
|
||||||
option(value="480") 480p
|
|
||||||
option(value="720") 720p
|
|
||||||
option(value="1080") 1080p
|
|
||||||
option(value="1440") 1440p
|
|
||||||
option(value="2160") 2160p
|
|
||||||
option(value="4320") 4320p
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_bufferingGoal__") Buffering Goal (in seconds)
|
|
||||||
input.bufferGoal(type="number" min="10")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_countrySelection__") Country Selection
|
|
||||||
select.region
|
|
||||||
option(value="AF") Afghanistan
|
|
||||||
option(value="AL") Albania
|
|
||||||
option(value="DZ") Algeria
|
|
||||||
option(value="AD") Andorra
|
|
||||||
option(value="AO") Angola
|
|
||||||
option(value="AG") Antigua and Barbuda
|
|
||||||
option(value="AR") Argentina
|
|
||||||
option(value="AM") Armenia
|
|
||||||
option(value="AU") Australia
|
|
||||||
option(value="AT") Austria
|
|
||||||
option(value="AZ") Azerbaijan
|
|
||||||
option(value="BS") Bahamas
|
|
||||||
option(value="BH") Bahrain
|
|
||||||
option(value="BD") Bangladesh
|
|
||||||
option(value="BB") Barbados
|
|
||||||
option(value="BY") Belarus
|
|
||||||
option(value="BE") Belgium
|
|
||||||
option(value="BZ") Belize
|
|
||||||
option(value="BJ") Benin
|
|
||||||
option(value="BT") Bhutan
|
|
||||||
option(value="BO") Bolivia (Plurinational State of)
|
|
||||||
option(value="BA") Bosnia and Herzegovina
|
|
||||||
option(value="BW") Botswana
|
|
||||||
option(value="BR") Brazil
|
|
||||||
option(value="BN") Brunei Darussalam
|
|
||||||
option(value="BG") Bulgaria
|
|
||||||
option(value="BF") Burkina Faso
|
|
||||||
option(value="BI") Burundi
|
|
||||||
option(value="CV") Cabo Verde
|
|
||||||
option(value="KH") Cambodia
|
|
||||||
option(value="CM") Cameroon
|
|
||||||
option(value="CA") Canada
|
|
||||||
option(value="CF") Central African Republic
|
|
||||||
option(value="TD") Chad
|
|
||||||
option(value="CL") Chile
|
|
||||||
option(value="CN") China
|
|
||||||
option(value="CO") Colombia
|
|
||||||
option(value="KM") Comoros
|
|
||||||
option(value="CG") Congo
|
|
||||||
option(value="CD") Congo, Democratic Republic of the
|
|
||||||
option(value="CR") Costa Rica
|
|
||||||
option(value="CI") Côte d'Ivoire
|
|
||||||
option(value="HR") Croatia
|
|
||||||
option(value="CU") Cuba
|
|
||||||
option(value="CY") Cyprus
|
|
||||||
option(value="CZ") Czechia
|
|
||||||
option(value="DK") Denmark
|
|
||||||
option(value="DJ") Djibouti
|
|
||||||
option(value="DM") Dominica
|
|
||||||
option(value="DO") Dominican Republic
|
|
||||||
option(value="EC") Ecuador
|
|
||||||
option(value="EG") Egypt
|
|
||||||
option(value="SV") El Salvador
|
|
||||||
option(value="GQ") Equatorial Guinea
|
|
||||||
option(value="ER") Eritrea
|
|
||||||
option(value="EE") Estonia
|
|
||||||
option(value="SZ") Eswatini
|
|
||||||
option(value="ET") Ethiopia
|
|
||||||
option(value="FJ") Fiji
|
|
||||||
option(value="FI") Finland
|
|
||||||
option(value="FR") France
|
|
||||||
option(value="GA") Gabon
|
|
||||||
option(value="GM") Gambia
|
|
||||||
option(value="GE") Georgia
|
|
||||||
option(value="DE") Germany
|
|
||||||
option(value="GH") Ghana
|
|
||||||
option(value="GR") Greece
|
|
||||||
option(value="GD") Grenada
|
|
||||||
option(value="GT") Guatemala
|
|
||||||
option(value="GN") Guinea
|
|
||||||
option(value="GW") Guinea-Bissau
|
|
||||||
option(value="GY") Guyana
|
|
||||||
option(value="HT") Haiti
|
|
||||||
option(value="HN") Honduras
|
|
||||||
option(value="HU") Hungary
|
|
||||||
option(value="IS") Iceland
|
|
||||||
option(value="IN") India
|
|
||||||
option(value="ID") Indonesia
|
|
||||||
option(value="IR") Iran (Islamic Republic of)
|
|
||||||
option(value="IQ") Iraq
|
|
||||||
option(value="IE") Ireland
|
|
||||||
option(value="IL") Israel
|
|
||||||
option(value="IT") Italy
|
|
||||||
option(value="JM") Jamaica
|
|
||||||
option(value="JP") Japan
|
|
||||||
option(value="JO") Jordan
|
|
||||||
option(value="KZ") Kazakhstan
|
|
||||||
option(value="KE") Kenya
|
|
||||||
option(value="KI") Kiribati
|
|
||||||
option(value="KP") Korea (Democratic People's Republic of)
|
|
||||||
option(value="KR") Korea, Republic of
|
|
||||||
option(value="KW") Kuwait
|
|
||||||
option(value="KG") Kyrgyzstan
|
|
||||||
option(value="LA") Lao People's Democratic Republic
|
|
||||||
option(value="LV") Latvia
|
|
||||||
option(value="LB") Lebanon
|
|
||||||
option(value="LS") Lesotho
|
|
||||||
option(value="LR") Liberia
|
|
||||||
option(value="LY") Libya
|
|
||||||
option(value="LI") Liechtenstein
|
|
||||||
option(value="LT") Lithuania
|
|
||||||
option(value="LU") Luxembourg
|
|
||||||
option(value="MG") Madagascar
|
|
||||||
option(value="MW") Malawi
|
|
||||||
option(value="MY") Malaysia
|
|
||||||
option(value="MV") Maldives
|
|
||||||
option(value="ML") Mali
|
|
||||||
option(value="MT") Malta
|
|
||||||
option(value="MH") Marshall Islands
|
|
||||||
option(value="MR") Mauritania
|
|
||||||
option(value="MU") Mauritius
|
|
||||||
option(value="MX") Mexico
|
|
||||||
option(value="FM") Micronesia (Federated States of)
|
|
||||||
option(value="MD") Moldova, Republic of
|
|
||||||
option(value="MC") Monaco
|
|
||||||
option(value="MN") Mongolia
|
|
||||||
option(value="ME") Montenegro
|
|
||||||
option(value="MA") Morocco
|
|
||||||
option(value="MZ") Mozambique
|
|
||||||
option(value="MM") Myanmar
|
|
||||||
option(value="NA") Namibia
|
|
||||||
option(value="NR") Nauru
|
|
||||||
option(value="NP") Nepal
|
|
||||||
option(value="NL") Netherlands
|
|
||||||
option(value="NZ") New Zealand
|
|
||||||
option(value="NI") Nicaragua
|
|
||||||
option(value="NE") Niger
|
|
||||||
option(value="NG") Nigeria
|
|
||||||
option(value="MK") North Macedonia
|
|
||||||
option(value="NO") Norway
|
|
||||||
option(value="OM") Oman
|
|
||||||
option(value="PK") Pakistan
|
|
||||||
option(value="PW") Palau
|
|
||||||
option(value="PA") Panama
|
|
||||||
option(value="PG") Papua New Guinea
|
|
||||||
option(value="PY") Paraguay
|
|
||||||
option(value="PE") Peru
|
|
||||||
option(value="PH") Philippines
|
|
||||||
option(value="PL") Poland
|
|
||||||
option(value="PT") Portugal
|
|
||||||
option(value="QA") Qatar
|
|
||||||
option(value="RO") Romania
|
|
||||||
option(value="RU") Russian Federation
|
|
||||||
option(value="RW") Rwanda
|
|
||||||
option(value="KN") Saint Kitts and Nevis
|
|
||||||
option(value="LC") Saint Lucia
|
|
||||||
option(value="VC") Saint Vincent and the Grenadines
|
|
||||||
option(value="WS") Samoa
|
|
||||||
option(value="SM") San Marino
|
|
||||||
option(value="ST") Sao Tome and Principe
|
|
||||||
option(value="SA") Saudi Arabia
|
|
||||||
option(value="SN") Senegal
|
|
||||||
option(value="RS") Serbia
|
|
||||||
option(value="SC") Seychelles
|
|
||||||
option(value="SL") Sierra Leone
|
|
||||||
option(value="SG") Singapore
|
|
||||||
option(value="SK") Slovakia
|
|
||||||
option(value="SI") Slovenia
|
|
||||||
option(value="SB") Solomon Islands
|
|
||||||
option(value="SO") Somalia
|
|
||||||
option(value="ZA") South Africa
|
|
||||||
option(value="SS") South Sudan
|
|
||||||
option(value="ES") Spain
|
|
||||||
option(value="LK") Sri Lanka
|
|
||||||
option(value="SD") Sudan
|
|
||||||
option(value="SR") Suriname
|
|
||||||
option(value="SE") Sweden
|
|
||||||
option(value="CH") Switzerland
|
|
||||||
option(value="SY") Syrian Arab Republic
|
|
||||||
option(value="TJ") Tajikistan
|
|
||||||
option(value="TZ") Tanzania, United Republic of
|
|
||||||
option(value="TH") Thailand
|
|
||||||
option(value="TL") Timor-Leste
|
|
||||||
option(value="TG") Togo
|
|
||||||
option(value="TO") Tonga
|
|
||||||
option(value="TT") Trinidad and Tobago
|
|
||||||
option(value="TN") Tunisia
|
|
||||||
option(value="TR") Turkey
|
|
||||||
option(value="TM") Turkmenistan
|
|
||||||
option(value="TV") Tuvalu
|
|
||||||
option(value="UG") Uganda
|
|
||||||
option(value="UA") Ukraine
|
|
||||||
option(value="AE") United Arab Emirates
|
|
||||||
option(value="GB") United Kingdom of Great Britain and Northern Ireland
|
|
||||||
option(value="US") United States of America
|
|
||||||
option(value="UY") Uruguay
|
|
||||||
option(value="UZ") Uzbekistan
|
|
||||||
option(value="VU") Vanuatu
|
|
||||||
option(value="VE") Venezuela (Bolivarian Republic of)
|
|
||||||
option(value="VN") Viet Nam
|
|
||||||
option(value="YE") Yemen
|
|
||||||
option(value="ZM") Zambia
|
|
||||||
option(value="ZW") Zimbabwe
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_defaultHomepage__") Default Homepage
|
|
||||||
select.homepage
|
|
||||||
option(value="trending" data-localise="__MSG_trending__") Trending
|
|
||||||
option(value="feed" data-localise="__MSG_feed__") Feed
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_showComments__") Show Comments
|
|
||||||
input.comments(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_minimizeDesc__") Minimize Description by default
|
|
||||||
input.minimizeDescription(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_storeHistory__") Store Watch History
|
|
||||||
input.watchHistory(type="checkbox")
|
|
||||||
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enabledCodecs__") Enabled Codecs (Multiple)
|
|
||||||
select.enabledCodecs
|
|
||||||
option(value="av1") AV1
|
|
||||||
option(value="vp9") VP9
|
|
||||||
option(value="avc") AVC (h.264)
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_disableLBRY__") Disable LBRY for Streaming
|
|
||||||
input.disableLBRY(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enableProxyLBRY__") Enable Proxy for LBRY
|
|
||||||
input.proxyLBRY(type="checkbox")
|
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://piped.com')
|
+instances('https://piped.com')
|
||||||
@ -653,67 +67,6 @@ body.option(dir="auto")
|
|||||||
|
|
||||||
#pipedMaterial
|
#pipedMaterial
|
||||||
hr
|
hr
|
||||||
.custom-settings
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_autoplayVid__") Autoplay Video
|
|
||||||
input.youtubeAutoplay(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4
|
|
||||||
x(data-localise="__MSG_volume__") Volume:
|
|
||||||
span.volume-value --%
|
|
||||||
input.volume(type="range" min="0" max="100" step="1")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_audioOnly__") Audio Only
|
|
||||||
input.listen(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_disableLBRY__") Disable LBRY
|
|
||||||
input.disableLBRY(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_proxyLBRY__") Proxy LBRY videos
|
|
||||||
input.proxyLBRY(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_enableSponsorBlock__") Enable Sponsorblock
|
|
||||||
input.sponsorblock(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipNote__") Skip to the last watched point when encountering a video already seen
|
|
||||||
input.skipToLastPoint(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipSponsors__") Skip Sponsors
|
|
||||||
input.selectedSkip-sponsor(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipIntermission__") Skip Intermission/Intro Animation
|
|
||||||
input.selectedSkip-intro(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skripEndcars__") Skip Endcards/Credits
|
|
||||||
input.selectedSkip-outro(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skripPreview__") Skip Preview/Recap
|
|
||||||
input.selectedSkip-preview(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipReminder__") Skip Interaction Reminder (Subscribe)
|
|
||||||
input.selectedSkip-interaction(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipUnpaidPromo__") Skip Unpaid/Self Promotion
|
|
||||||
input.selectedSkip-selfpromo(type="checkbox")
|
|
||||||
|
|
||||||
.some-block.option-block
|
|
||||||
h4(data-localise="__MSG_skipMusic__") Skip Music: Non-Music Section
|
|
||||||
input.selectedSkip-music_offtopic(type="checkbox")
|
|
||||||
|
|
||||||
hr
|
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
include ../../widgets/instances.pug
|
include ../../widgets/instances.pug
|
||||||
+instances('https://piped-material.com')
|
+instances('https://piped-material.com')
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
<body class="option" dir="auto">
|
<body class="option" dir="auto">
|
||||||
<section class="links">
|
<section class="links">
|
||||||
<div class="title">
|
<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">
|
<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>
|
<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/general.html" data-localise="__MSG_general__">General</a>
|
</svg><a href="../general/general.html" data-localise="__MSG_general__">General</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-icon.png"><a href="../youtube/youtube.html" data-localise="__MSG_youtube__">YouTube </a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a class="selected" href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
<div class="title"> <img src="../../../assets/images/youtube-music-icon.png"><a class="selected" href="../youtubeMusic/youtubeMusic.html" data-localise="__MSG_ytmusic__">YT Music</a></div>
|
||||||
@ -25,33 +25,33 @@
|
|||||||
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="../imgur/imgur.html" data-localise="__MSG_imgur__">Imgur</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
<circle cx="500" cy="500" r="500"></circle>
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
</svg><a href="../medium/medium.html" data-localise="__MSG_medium__">Medium</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="../peertube/peertube.html" data-localise="__MSG_peertube__">Peertube</a></div>
|
||||||
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="../lbry/lbry.html" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<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>
|
<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/search.html" data-localise="__MSG_search__">Search</a>
|
</svg><a href="../search/search.html" data-localise="__MSG_search__">Search</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/translate.html" data-localise="__MSG_translate__">Translate</a>
|
</svg><a href="../translate/translate.html" data-localise="__MSG_translate__">Translate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path>
|
<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/maps.html" data-localise="__MSG_maps__">Maps</a>
|
</svg><a href="../maps/maps.html" data-localise="__MSG_maps__">Maps</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" height="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>
|
<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/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
</svg><a href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__">Send Files</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="option-block">
|
<section class="option-block">
|
||||||
|
@ -1,183 +1,112 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="utf-8">
|
||||||
<meta charset="utf-8" />
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<link href="../stylesheets/styles.css" rel="stylesheet">
|
||||||
<link href="../stylesheets/styles.css" rel="stylesheet" />
|
<link href="./style.css" rel="stylesheet">
|
||||||
<link href="./style.css" rel="stylesheet" />
|
</head>
|
||||||
</head>
|
<body dir="auto">
|
||||||
|
<div class="some-block" id="youtube"><a class="title" href="https://youtube.com"><img src="../../assets/images/youtube-icon.png">
|
||||||
<body dir="auto">
|
<h4>YouTube</h4></a>
|
||||||
<div id="youtube" class="some-block">
|
<input id="disable-youtube" type="checkbox">
|
||||||
<a class="title" href="https://youtube.com">
|
</div>
|
||||||
<img src="../../assets/images/youtube-icon.png" />
|
<div class="some-block" id="youtubeMusic"><a class="title" href="https://music.youtube.com"><img src="../../assets/images/youtube-music-icon.png">
|
||||||
<h4 data-localise="__MSG_youtube__">YouTube</h4>
|
<h4>YT Music</h4></a>
|
||||||
</a>
|
<input id="disable-youtubeMusic" type="checkbox">
|
||||||
<input id="disable-youtube" type="checkbox" checked />
|
</div>
|
||||||
</div>
|
<div class="some-block" id="twitter"><a class="title" href="https://twitter.com"><img src="../../assets/images/twitter-icon.png">
|
||||||
|
<h4>Twitter</h4></a>
|
||||||
<div id="youtubeMusic" class="some-block">
|
<input id="disable-nitter" type="checkbox">
|
||||||
<a class="title" href="https://music.youtube.com">
|
</div>
|
||||||
<img src="../../assets/images/youtube-music-icon.png" />
|
<div class="some-block" id="instagram"><a class="title" href="https://instagram.com"><img src="../../assets/images/instagram-icon.png">
|
||||||
<h4 data-localise="__MSG_ytmusic__">YT Music</h4>
|
<h4>Instagram</h4></a>
|
||||||
</a>
|
<input id="disable-bibliogram" type="checkbox">
|
||||||
<input id="disable-youtubeMusic" type="checkbox" checked />
|
</div>
|
||||||
</div>
|
<div class="some-block" id="tikTok"><a class="title" href="https://tiktok.com"><img src="../../assets/images/tiktok-icon.png">
|
||||||
|
<h4>TikTok</h4></a>
|
||||||
<div id="twitter" class="some-block">
|
<input id="disable-tiktok" type="checkbox">
|
||||||
<a class="title" href="https://twitter.com">
|
</div>
|
||||||
<img src="../../assets/images/twitter-icon.png" />
|
<div class="some-block" id="imgur"><a class="title" href="https://imgur.com"><img src="../../assets/images/imgur-icon.png">
|
||||||
<h4 data-localise="__MSG_twitter__">Twitter</h4>
|
<h4>Imgur</h4></a>
|
||||||
</a>
|
<input id="disable-imgur" type="checkbox">
|
||||||
<input id="disable-nitter" type="checkbox" checked />
|
</div>
|
||||||
</div>
|
<div class="some-block" id="reddit"><a class="title" href="https://reddit.com"><img src="../../assets/images/reddit-icon.png">
|
||||||
|
<h4>Reddit</h4></a>
|
||||||
<div id="instagram" class="some-block">
|
<input id="disable-reddit" type="checkbox">
|
||||||
<a class="title" href="https://instagram.com">
|
</div>
|
||||||
<!-- https://www.iconfinder.com/Indygo -->
|
<div class="some-block" id="wikipedia"><a class="title" href="https://wikipedia.com"><img src="../../assets/images/wikipedia-icon.png">
|
||||||
<img src="../../assets/images/instagram-icon.png" />
|
<h4>Wikipedia</h4></a>
|
||||||
<h4 data-localise="__MSG_instagram__">Instagram</h4>
|
<input id="disable-wikipedia" type="checkbox">
|
||||||
</a>
|
</div>
|
||||||
<input id="disable-bibliogram" type="checkbox" checked />
|
<div class="some-block" id="medium"><a class="title" href="https://medium.com">
|
||||||
</div>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
|
||||||
|
<circle cx="500" cy="500" r="500"></circle>
|
||||||
<div id="tikTok" class="some-block">
|
<ellipse ry="475" rx="250" cy="501" cx="1296"></ellipse>
|
||||||
<a class="title" href="https://tiktok.com">
|
<ellipse cx="1682" cy="502" rx="88" ry="424"></ellipse>
|
||||||
<!-- https://www.flaticon.com/authors/designer-shah -->
|
</svg>
|
||||||
<img src="../../assets/images/tiktok-icon.png" />
|
<h4>Medium</h4></a>
|
||||||
<h4 data-localise="__MSG_tiktok__">TikTok</h4>
|
<input id="disable-medium" type="checkbox">
|
||||||
</a>
|
</div>
|
||||||
<input id="disable-tiktok" type="checkbox" checked />
|
<div class="some-block" id="peertube"><a class="title" href="https://peertube.com"><img src="../../assets/images/peertube-icon.png">
|
||||||
</div>
|
<h4>Peertube</h4></a>
|
||||||
|
<input id="disable-peertube" type="checkbox">
|
||||||
<div id="imgur" class="some-block">
|
</div>
|
||||||
<a class="title" href="https://imgur.com">
|
<div class="some-block" id="lbry"><a class="title" href="https://lbry.com"><img src="../../assets/images/lbry-icon.png">
|
||||||
<img src="../../assets/images/imgur-icon.png" />
|
<h4>LBRY</h4></a>
|
||||||
<h4 data-localise="__MSG_imgur__">Imgur</h4>
|
<input id="disable-lbry" type="checkbox">
|
||||||
</a>
|
</div>
|
||||||
<input id="disable-imgur" type="checkbox" checked />
|
<div class="some-block" id="search"><a class="title" href="https://search.com">
|
||||||
</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>
|
||||||
<div id="reddit" class="some-block">
|
</svg>
|
||||||
<a class="title" href="https://reddit.com">
|
<h4>Search</h4></a>
|
||||||
<!-- https://www.flaticon.com/authors/md-tanvirul-haque -->
|
<input id="disable-search" type="checkbox">
|
||||||
<img src="../../assets/images/reddit-icon.png" />
|
</div>
|
||||||
<h4 data-localise="__MSG_reddit__">Reddit</h4>
|
<div class="some-block" id="translate"><a class="title" href="https://translate.com">
|
||||||
</a>
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<input id="disable-reddit" type="checkbox" checked />
|
<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>
|
||||||
</div>
|
</svg>
|
||||||
|
<h4>Translate</h4></a>
|
||||||
<div id="wikipedia" class="some-block">
|
<input id="disable-simplyTranslate" type="checkbox">
|
||||||
<a class="title" href="https://wikipedia.org">
|
</div>
|
||||||
<img src="../../../assets/images/wikipedia-icon.svg" />
|
<div class="some-block" id="maps"><a class="title" href="https://maps.com">
|
||||||
<h4 data-localise="__MSG_wikipedia__">Wikipedia</h4>
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
</a>
|
<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>
|
||||||
<input id="disable-wikipedia" type="checkbox" checked />
|
</svg>
|
||||||
</div>
|
<h4>Maps</h4></a>
|
||||||
|
<input id="disable-osm" type="checkbox">
|
||||||
<div id="medium" class="some-block">
|
</div>
|
||||||
<a class="title" href="https://medium.com">
|
<div class="some-block" id="sendTargets"><a class="title" href="https://send.invalid">
|
||||||
<!-- https://markentier.tech/posts/2020/10/medium-icon-svg/ -->
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" 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>
|
||||||
<circle cx="500" cy="500" r="500" />
|
</svg>
|
||||||
<ellipse ry="475" rx="250" cy="501" cx="1296" />
|
<h4>Send Files</h4></a>
|
||||||
<ellipse cx="1682" cy="502" rx="88" ry="424" />
|
<input id="disable-sendTargets" type="checkbox">
|
||||||
</svg>
|
</div>
|
||||||
<h4 data-localise="__MSG_medium__">Medium</h4>
|
<div class="some-block"><a class="title button" id="change-instance">
|
||||||
</a>
|
<svg xmlns="http://www.w3.org/2000/svg" height="26px" viewBox="0 0 24 24" width="26px" fill="currentColor">
|
||||||
<input id="disable-medium" type="checkbox" checked />
|
<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>
|
||||||
</div>
|
</svg>
|
||||||
|
<h4>Change Instance</h4></a></div>
|
||||||
<div id="peertube" class="some-block">
|
<div class="some-block"><a class="title button" id="more-options">
|
||||||
<a class="title" href="https://search.joinpeertube.org">
|
<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">
|
||||||
<img src="../../../assets/images/peertube-icon.svg" />
|
<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>
|
||||||
<h4 data-localise="__MSG_peertube__">Peertube</h4>
|
</svg>
|
||||||
</a>
|
<h4>Settings</h4></a></div>
|
||||||
<input id="disable-peertube" type="checkbox" checked />
|
<div class="some-block" title="Copy the original redirected link"> <a class="title button" id="copy_raw">
|
||||||
</div>
|
<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>
|
||||||
<div id="lbry" class="some-block">
|
</svg>
|
||||||
<a class="title" href="https://odysee.com">
|
<h4>Copy Raw</h4></a></div>
|
||||||
<img src="../../../assets/images/lbry-icon.png" />
|
<div class="some-block" title="Unify cookies across all selected instances"><a class="title button" id="unify">
|
||||||
<h4 data-localise="__MSG_lbry__">LBRY</h4>
|
<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">
|
||||||
</a>
|
<rect fill="none" height="24" width="24"></rect>
|
||||||
<input id="disable-lbry" type="checkbox" checked />
|
<path d="M18,2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M18,16H9V4h9V16z M3,15v-2h2v2H3z M3,9.5h2v2H3V9.5z M10,20h2v2h-2V20z M3,18.5v-2h2v2H3z M5,22c-1.1,0-2-0.9-2-2h2V22z M8.5,22h-2v-2h2V22z M13.5,22L13.5,22l0-2h2 v0C15.5,21.1,14.6,22,13.5,22z M5,6L5,6l0,2H3v0C3,6.9,3.9,6,5,6z"></path>
|
||||||
</div>
|
</svg>
|
||||||
<div id="search" class="some-block">
|
<h4>Unify Settings</h4></a></div>
|
||||||
<a class="title" href="http://libredirect.invalid">
|
<script type="module" src="../options/init.js"></script>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<script type="module" src="./popup.js"></script>
|
||||||
<path d="M0 0h24v24H0V0z" fill="none" />
|
<script src="../../assets/javascripts/localise.js"></script>
|
||||||
<path
|
</body>
|
||||||
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" />
|
|
||||||
</svg>
|
|
||||||
<h4 data-localise="__MSG_search__">Search</h4>
|
|
||||||
</a>
|
|
||||||
<input id="disable-search" type="checkbox" checked />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="translate" class="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" />
|
|
||||||
</svg>
|
|
||||||
<h4 data-localise="__MSG_translate__">Translate</h4>
|
|
||||||
</a>
|
|
||||||
<input id="disable-simplyTranslate" type="checkbox" checked />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="maps" class="some-block">
|
|
||||||
<a class="title" href="https://maps.google.com">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
|
||||||
<path d="M0 0h24v24H0V0z" fill="none" />
|
|
||||||
<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" />
|
|
||||||
</svg>
|
|
||||||
<h4 data-localise="__MSG_maps__">Maps</h4>
|
|
||||||
</a>
|
|
||||||
<input id="disable-osm" type="checkbox" checked />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="sendTargets" class="some-block">
|
|
||||||
<a class="title" href="http://send.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" />
|
|
||||||
</svg>
|
|
||||||
<h4 data-localise="__MSG_sendFiles__">Send Files</h4>
|
|
||||||
</a>
|
|
||||||
<input id="disable-sendTargets" type="checkbox" checked />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="buttons-popup">
|
|
||||||
<a class="button" id="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" />
|
|
||||||
</svg>
|
|
||||||
<x data-localise="__MSG_instance__">Instance</x>
|
|
||||||
</a>
|
|
||||||
<a class="button" id="more-options">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="26px" viewBox="0 0 24 24"
|
|
||||||
width="26px" fill="currentColor">
|
|
||||||
<path
|
|
||||||
d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" />
|
|
||||||
</svg>
|
|
||||||
<x data-localise="__MSG_settings__">Settings</x>
|
|
||||||
</a>
|
|
||||||
<a class="button" id="copy_raw">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
|
||||||
<path
|
|
||||||
d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" />
|
|
||||||
</svg>
|
|
||||||
<x data-localise="__MSG_copyRaw__">Copy Raw</x>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="module" src="../options/init.js"></script>
|
|
||||||
<script type="module" src="./popup.js"></script>
|
|
||||||
<script src="../../assets/javascripts/localise.js"></script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -36,6 +36,8 @@ let disableImgurElement = document.getElementById("disable-imgur");
|
|||||||
let disableTiktokElement = document.getElementById("disable-tiktok");
|
let disableTiktokElement = document.getElementById("disable-tiktok");
|
||||||
|
|
||||||
let copyRawElement = document.getElementById('copy_raw');
|
let copyRawElement = document.getElementById('copy_raw');
|
||||||
|
let unifyElement = document.getElementById('unify');
|
||||||
|
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
[
|
[
|
||||||
"disableTwitter",
|
"disableTwitter",
|
||||||
@ -93,38 +95,60 @@ document.addEventListener("change", () => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
let changeInstanceElement = document.getElementById("change-instance")
|
let changeInstanceElement = document.getElementById("change-instance")
|
||||||
changeInstanceElement.addEventListener("click", switchInstance);
|
changeInstanceElement.addEventListener("click", switchInstance);
|
||||||
copyRawElement.addEventListener("click", copyRaw);
|
copyRawElement.addEventListener("click", copyRaw);
|
||||||
|
document.getElementById("more-options").addEventListener("click", () => browser.runtime.openOptionsPage());
|
||||||
|
unifyElement.addEventListener("click", unify)
|
||||||
|
|
||||||
|
function unify() {
|
||||||
|
browser.tabs.query(
|
||||||
|
{ active: true, currentWindow: true },
|
||||||
|
async tabs => {
|
||||||
|
let currTab = tabs[0]
|
||||||
|
if (currTab) {
|
||||||
|
let url = new URL(currTab.url);
|
||||||
|
|
||||||
document.getElementById("more-options").addEventListener("click",
|
let result = await youtubeHelper.initInvidiousCookies(url);
|
||||||
() => browser.runtime.openOptionsPage()
|
if (!result) result = await youtubeHelper.copyPipedLocalStorage(url, currTab.id);
|
||||||
);
|
if (!result) result = await twitterHelper.initNitterCookies(url);
|
||||||
|
if (!result) result = await redditHelper.initLibredditCookies(url);
|
||||||
|
if (!result) result = await redditHelper.initTedditCookies(url);
|
||||||
|
if (!result) result = await redditHelper.initSearxCookies(url);
|
||||||
|
if (!result) result = await redditHelper.initSearxngCookies(url);
|
||||||
|
if (!result) result = await tiktokHelper.initProxiTokCookies(url);
|
||||||
|
if (!result) result = await tiktokHelper.initWikilessCookies(url);
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
const textElement = unifyElement.getElementsByTagName('h4')[0]
|
||||||
|
const oldHtml = textElement.innerHTML;
|
||||||
|
textElement.innerHTML = 'Unified';
|
||||||
|
setTimeout(() => textElement.innerHTML = oldHtml, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
function switchInstance() {
|
function switchInstance() {
|
||||||
browser.tabs.query({ active: true, currentWindow: true }, async tabs => {
|
browser.tabs.query({ active: true, currentWindow: true }, async tabs => {
|
||||||
let currTab = tabs[0];
|
let currTab = tabs[0];
|
||||||
if (currTab) {
|
if (currTab) {
|
||||||
let url = currTab.url;
|
let url = new URL(currTab.url);
|
||||||
let tabUrl
|
|
||||||
try { tabUrl = new URL(url); }
|
|
||||||
catch (_) { return false; }
|
|
||||||
let newUrl;
|
let newUrl;
|
||||||
|
|
||||||
// newUrl = youtubeHelper.switchInstance(tabUrl);
|
// newUrl = youtubeHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = twitterHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = twitterHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = instagramHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = instagramHelper.switchInstance(url);
|
||||||
if (!newUrl) newUrl = await redditHelper.switchInstance(tabUrl);
|
if (!newUrl) newUrl = await redditHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = searchHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = searchHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = translateHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = translateHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = mediumHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = mediumHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = sendTargetsHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = sendTargetsHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = peertubeHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = peertubeHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = lbryHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = lbryHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = imgurHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = imgurHelper.switchInstance(url);
|
||||||
// if (!newUrl) newUrl = wikipediaHelper.switchInstance(tabUrl);
|
// if (!newUrl) newUrl = wikipediaHelper.switchInstance(url);
|
||||||
|
|
||||||
if (newUrl) {
|
if (newUrl) {
|
||||||
browser.tabs.update({ url: newUrl });
|
browser.tabs.update({ url: newUrl });
|
||||||
@ -136,31 +160,29 @@ function switchInstance() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function copyRaw() {
|
function copyRaw() {
|
||||||
browser.tabs.query({ active: true, currentWindow: true }, function (tabs) {
|
browser.tabs.query(
|
||||||
let currTab = tabs[0];
|
{ active: true, currentWindow: true }, tabs => {
|
||||||
if (currTab) {
|
let currTab = tabs[0];
|
||||||
let url = currTab.url;
|
if (currTab) {
|
||||||
let tabUrl
|
let url = new URL(currTab.url);
|
||||||
try { tabUrl = new URL(url); }
|
let newUrl;
|
||||||
catch (_) { return false; }
|
newUrl = youtubeHelper.reverse(url);
|
||||||
let newUrl;
|
|
||||||
newUrl = youtubeHelper.reverse(tabUrl);
|
if (!newUrl) newUrl = twitterHelper.reverse(url);
|
||||||
if (!newUrl) newUrl = twitterHelper.reverse(tabUrl);
|
if (!newUrl) newUrl = instagramHelper.reverse(url);
|
||||||
if (!newUrl) newUrl = instagramHelper.reverse(tabUrl);
|
if (!newUrl) newUrl = tiktokHelper.reverse(url);
|
||||||
if (!newUrl) newUrl = tiktokHelper.reverse(tabUrl);
|
if (!newUrl) newUrl = imgurHelper.reverse(url);
|
||||||
if (!newUrl) newUrl = imgurHelper.reverse(tabUrl);
|
|
||||||
if (newUrl) {
|
if (newUrl) {
|
||||||
navigator.clipboard.writeText(newUrl);
|
navigator.clipboard.writeText(newUrl);
|
||||||
const oldHtml = copyRawElement.innerHTML;
|
const textElement = copyRawElement.getElementsByTagName('h4')[0]
|
||||||
copyRawElement.innerHTML = `
|
const oldHtml = textElement.innerHTML;
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
textElement.innerHTML = 'Copied';
|
||||||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
|
setTimeout(() => textElement.innerHTML = oldHtml, 1000);
|
||||||
</svg>
|
}
|
||||||
Copied`;
|
|
||||||
setTimeout(() => copyRawElement.innerHTML = oldHtml, 1000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
let popupFrontends;
|
let popupFrontends;
|
||||||
|
123
src/pages/popup/popup.pug
Normal file
123
src/pages/popup/popup.pug
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
include ../widgets/icons.pug
|
||||||
|
|
||||||
|
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")
|
||||||
|
#youtube.some-block
|
||||||
|
a.title(href="https://youtube.com")
|
||||||
|
img(src="../../assets/images/youtube-icon.png")
|
||||||
|
h4 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 YT Music
|
||||||
|
input#disable-youtubeMusic(type="checkbox")
|
||||||
|
|
||||||
|
#twitter.some-block
|
||||||
|
a.title(href="https://twitter.com")
|
||||||
|
img(src="../../assets/images/twitter-icon.png")
|
||||||
|
h4 Twitter
|
||||||
|
input#disable-nitter(type="checkbox")
|
||||||
|
|
||||||
|
#instagram.some-block
|
||||||
|
a.title(href="https://instagram.com")
|
||||||
|
img(src="../../assets/images/instagram-icon.png")
|
||||||
|
h4 Instagram
|
||||||
|
input#disable-bibliogram(type="checkbox")
|
||||||
|
|
||||||
|
#tikTok.some-block
|
||||||
|
a.title(href="https://tiktok.com")
|
||||||
|
img(src="../../assets/images/tiktok-icon.png")
|
||||||
|
h4 TikTok
|
||||||
|
input#disable-tiktok(type="checkbox")
|
||||||
|
|
||||||
|
#imgur.some-block
|
||||||
|
a.title(href="https://imgur.com")
|
||||||
|
img(src="../../assets/images/imgur-icon.png")
|
||||||
|
h4 Imgur
|
||||||
|
input#disable-imgur(type="checkbox")
|
||||||
|
|
||||||
|
#reddit.some-block
|
||||||
|
a.title(href="https://reddit.com")
|
||||||
|
img(src="../../assets/images/reddit-icon.png")
|
||||||
|
h4 Reddit
|
||||||
|
input#disable-reddit(type="checkbox")
|
||||||
|
|
||||||
|
#wikipedia.some-block
|
||||||
|
a.title(href="https://wikipedia.com")
|
||||||
|
img(src="../../assets/images/wikipedia-icon.png")
|
||||||
|
h4 Wikipedia
|
||||||
|
input#disable-wikipedia(type="checkbox")
|
||||||
|
|
||||||
|
#medium.some-block
|
||||||
|
a.title(href="https://medium.com")
|
||||||
|
+medium
|
||||||
|
h4 Medium
|
||||||
|
input#disable-medium(type="checkbox")
|
||||||
|
|
||||||
|
#peertube.some-block
|
||||||
|
a.title(href="https://peertube.com")
|
||||||
|
img(src="../../assets/images/peertube-icon.png")
|
||||||
|
h4 Peertube
|
||||||
|
input#disable-peertube(type="checkbox")
|
||||||
|
|
||||||
|
#lbry.some-block
|
||||||
|
a.title(href="https://lbry.com")
|
||||||
|
img(src="../../assets/images/lbry-icon.png")
|
||||||
|
h4 LBRY
|
||||||
|
input#disable-lbry(type="checkbox")
|
||||||
|
|
||||||
|
#search.some-block
|
||||||
|
a.title(href="https://search.com")
|
||||||
|
+search
|
||||||
|
h4 Search
|
||||||
|
input#disable-search(type="checkbox")
|
||||||
|
|
||||||
|
#translate.some-block
|
||||||
|
a.title(href="https://translate.com")
|
||||||
|
+translate
|
||||||
|
h4 Translate
|
||||||
|
input#disable-simplyTranslate(type="checkbox")
|
||||||
|
|
||||||
|
#maps.some-block
|
||||||
|
a.title(href="https://maps.com")
|
||||||
|
+maps
|
||||||
|
h4 Maps
|
||||||
|
input#disable-osm(type="checkbox")
|
||||||
|
|
||||||
|
#sendTargets.some-block
|
||||||
|
a.title(href="https://send.invalid")
|
||||||
|
+send
|
||||||
|
h4 Send Files
|
||||||
|
input#disable-sendTargets(type="checkbox")
|
||||||
|
|
||||||
|
.some-block
|
||||||
|
a#change-instance.title.button
|
||||||
|
+change_instance
|
||||||
|
h4 Change Instance
|
||||||
|
|
||||||
|
.some-block
|
||||||
|
a#more-options.title.button
|
||||||
|
+settings
|
||||||
|
h4 Settings
|
||||||
|
|
||||||
|
.some-block(title="Copy the original redirected link")
|
||||||
|
a#copy_raw.title.button
|
||||||
|
+copy_raw
|
||||||
|
h4 Copy Raw
|
||||||
|
|
||||||
|
.some-block(title="Unify cookies across all selected instances")
|
||||||
|
a#unify.title.button
|
||||||
|
+unify
|
||||||
|
h4 Unify Settings
|
||||||
|
|
||||||
|
script(type="module" src="../options/init.js")
|
||||||
|
script(type="module" src="./popup.js")
|
||||||
|
script(src="../../assets/javascripts/localise.js")
|
@ -278,15 +278,9 @@ div.buttons-popup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
text-align: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 0;
|
|
||||||
padding: 5px 5px;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition-duration: 0.1s;
|
transition-duration: 0.1s;
|
||||||
|
@ -1,130 +0,0 @@
|
|||||||
option(value="" data-localise="__MSG_none__") none
|
|
||||||
option(value="English") English
|
|
||||||
option(value="English (auto-generated)") English (auto-generated)
|
|
||||||
option(value="English (United Kingdom)") English (United Kingdom)
|
|
||||||
option(value="English (United States)") English (United States)
|
|
||||||
option(value="Afrikaans") Afrikaans
|
|
||||||
option(value="Albanian") Albanian
|
|
||||||
option(value="Amharic") Amharic
|
|
||||||
option(value="Arabic") Arabic
|
|
||||||
option(value="Armenian") Armenian
|
|
||||||
option(value="Azerbaijani") Azerbaijani
|
|
||||||
option(value="Bangla") Bangla
|
|
||||||
option(value="Basque") Basque
|
|
||||||
option(value="Belarusian") Belarusian
|
|
||||||
option(value="Bosnian") Bosnian
|
|
||||||
option(value="Bulgarian") Bulgarian
|
|
||||||
option(value="Burmese") Burmese
|
|
||||||
option(value="Cantonese (Hong Kong)") Cantonese (Hong Kong)
|
|
||||||
option(value="Catalan") Catalan
|
|
||||||
option(value="Cebuano") Cebuano
|
|
||||||
option(value="Chinese") Chinese
|
|
||||||
option(value="Chinese (China)") Chinese (China)
|
|
||||||
option(value="Chinese (Hong Kong)") Chinese (Hong Kong)
|
|
||||||
option(value="Chinese (Simplified)") Chinese (Simplified)
|
|
||||||
option(value="Chinese (Taiwan)") Chinese (Taiwan)
|
|
||||||
option(value="Chinese (Traditional)") Chinese (Traditional)
|
|
||||||
option(value="Corsican") Corsican
|
|
||||||
option(value="Croatian") Croatian
|
|
||||||
option(value="Czech") Czech
|
|
||||||
option(value="Danish") Danish
|
|
||||||
option(value="Dutch") Dutch
|
|
||||||
option(value="Dutch (auto-generated)") Dutch (auto-generated)
|
|
||||||
option(value="Esperanto") Esperanto
|
|
||||||
option(value="Estonian") Estonian
|
|
||||||
option(value="Filipino") Filipino
|
|
||||||
option(value="Finnish") Finnish
|
|
||||||
option(value="French") French
|
|
||||||
option(value="French (auto-generated)") French (auto-generated)
|
|
||||||
option(value="Galician") Galician
|
|
||||||
option(value="Georgian") Georgian
|
|
||||||
option(value="German") German
|
|
||||||
option(value="German (auto-generated)") German (auto-generated)
|
|
||||||
option(value="Greek") Greek
|
|
||||||
option(value="Gujarati") Gujarati
|
|
||||||
option(value="Haitian Creole") Haitian Creole
|
|
||||||
option(value="Hausa") Hausa
|
|
||||||
option(value="Hawaiian") Hawaiian
|
|
||||||
option(value="Hebrew") Hebrew
|
|
||||||
option(value="Hindi") Hindi
|
|
||||||
option(value="Hmong") Hmong
|
|
||||||
option(value="Hungarian") Hungarian
|
|
||||||
option(value="Icelandic") Icelandic
|
|
||||||
option(value="Igbo") Igbo
|
|
||||||
option(value="Indonesian") Indonesian
|
|
||||||
option(value="Indonesian (auto-generated)") Indonesian (auto-generated)
|
|
||||||
option(value="Interlingue") Interlingue
|
|
||||||
option(value="Irish") Irish
|
|
||||||
option(value="Italian") Italian
|
|
||||||
option(value="Italian (auto-generated)") Italian (auto-generated)
|
|
||||||
option(value="Japanese") Japanese
|
|
||||||
option(value="Japanese (auto-generated)") Japanese (auto-generated)
|
|
||||||
option(value="Javanese") Javanese
|
|
||||||
option(value="Kannada") Kannada
|
|
||||||
option(value="Kazakh") Kazakh
|
|
||||||
option(value="Khmer") Khmer
|
|
||||||
option(value="Korean") Korean
|
|
||||||
option(value="Korean (auto-generated)") Korean (auto-generated)
|
|
||||||
option(value="Kurdish") Kurdish
|
|
||||||
option(value="Kyrgyz") Kyrgyz
|
|
||||||
option(value="Lao") Lao
|
|
||||||
option(value="Latin") Latin
|
|
||||||
option(value="Latvian") Latvian
|
|
||||||
option(value="Lithuanian") Lithuanian
|
|
||||||
option(value="Luxembourgish") Luxembourgish
|
|
||||||
option(value="Macedonian") Macedonian
|
|
||||||
option(value="Malagasy") Malagasy
|
|
||||||
option(value="Malay") Malay
|
|
||||||
option(value="Malayalam") Malayalam
|
|
||||||
option(value="Maltese") Maltese
|
|
||||||
option(value="Maori") Maori
|
|
||||||
option(value="Marathi") Marathi
|
|
||||||
option(value="Mongolian") Mongolian
|
|
||||||
option(value="Nepali") Nepali
|
|
||||||
option(value="Norwegian Bokmål") Norwegian Bokmål
|
|
||||||
option(value="Nyanja") Nyanja
|
|
||||||
option(value="Pashto") Pashto
|
|
||||||
option(value="Persian") Persian
|
|
||||||
option(value="Polish") Polish
|
|
||||||
option(value="Portuguese") Portuguese
|
|
||||||
option(value="Portuguese (auto-generated)") Portuguese (auto-generated)
|
|
||||||
option(value="Portuguese (Brazil)") Portuguese (Brazil)
|
|
||||||
option(value="Punjabi") Punjabi
|
|
||||||
option(value="Romanian") Romanian
|
|
||||||
option(value="Russian") Russian
|
|
||||||
option(value="Russian (auto-generated)") Russian (auto-generated)
|
|
||||||
option(value="Samoan") Samoan
|
|
||||||
option(value="Scottish Gaelic") Scottish Gaelic
|
|
||||||
option(value="Serbian") Serbian
|
|
||||||
option(value="Shona") Shona
|
|
||||||
option(value="Sindhi") Sindhi
|
|
||||||
option(value="Sinhala") Sinhala
|
|
||||||
option(value="Slovak") Slovak
|
|
||||||
option(value="Slovenian") Slovenian
|
|
||||||
option(value="Somali") Somali
|
|
||||||
option(value="Southern Sotho") Southern Sotho
|
|
||||||
option(value="Spanish") Spanish
|
|
||||||
option(value="Spanish (auto-generated)") Spanish (auto-generated)
|
|
||||||
option(value="Spanish (Latin America)") Spanish (Latin America)
|
|
||||||
option(value="Spanish (Mexico)") Spanish (Mexico)
|
|
||||||
option(value="Spanish (Spain)") Spanish (Spain)
|
|
||||||
option(value="Sundanese") Sundanese
|
|
||||||
option(value="Swahili") Swahili
|
|
||||||
option(value="Swedish") Swedish
|
|
||||||
option(value="Tajik") Tajik
|
|
||||||
option(value="Tamil") Tamil
|
|
||||||
option(value="Telugu") Telugu
|
|
||||||
option(value="Thai") Thai
|
|
||||||
option(value="Turkish") Turkish
|
|
||||||
option(value="Turkish (auto-generated)") Turkish (auto-generated)
|
|
||||||
option(value="Ukrainian") Ukrainian
|
|
||||||
option(value="Urdu") Urdu
|
|
||||||
option(value="Uzbek") Uzbek
|
|
||||||
option(value="Vietnamese") Vietnamese
|
|
||||||
option(value="Vietnamese (auto-generated)") Vietnamese (auto-generated)
|
|
||||||
option(value="Welsh") Welsh
|
|
||||||
option(value="Western Frisian") Western Frisian
|
|
||||||
option(value="Xhosa") Xhosa
|
|
||||||
option(value="Yiddish") Yiddish
|
|
||||||
option(value="Yoruba") Yoruba
|
|
||||||
option(value="Zulu") Zulu
|
|
@ -1,108 +0,0 @@
|
|||||||
option(value="af") Afrikaans
|
|
||||||
option(value="sq") Albanian
|
|
||||||
option(value="am") Amharic
|
|
||||||
option(value="ar") Arabic
|
|
||||||
option(value="hy") Armenian
|
|
||||||
option(value="az") Azerbaijani
|
|
||||||
option(value="eu") Basque
|
|
||||||
option(value="be") Belarusian
|
|
||||||
option(value="bn") Bengali
|
|
||||||
option(value="bs") Bosnian
|
|
||||||
option(value="bg") Bulgarian
|
|
||||||
option(value="ca") Catalan
|
|
||||||
option(value="ceb") Cebuano
|
|
||||||
option(value="ny") Chichewa
|
|
||||||
option(value="zh-CN") Chinese
|
|
||||||
option(value="co") Corsican
|
|
||||||
option(value="hr") Croatian
|
|
||||||
option(value="cs") Czech
|
|
||||||
option(value="da") Danish
|
|
||||||
option(value="nl") Dutch
|
|
||||||
option(value="en") English
|
|
||||||
option(value="eo") Esperanto
|
|
||||||
option(value="et") Estonian
|
|
||||||
option(value="tl") Filipino
|
|
||||||
option(value="fi") Finnish
|
|
||||||
option(value="fr") French
|
|
||||||
option(value="fy") Frisian
|
|
||||||
option(value="gl") Galician
|
|
||||||
option(value="ka") Georgian
|
|
||||||
option(value="de") German
|
|
||||||
option(value="el") Greek
|
|
||||||
option(value="gu") Gujarati
|
|
||||||
option(value="ht") Haitian Creole
|
|
||||||
option(value="ha") Hausa
|
|
||||||
option(value="haw") Hawaiian
|
|
||||||
option(value="iw") Hebrew
|
|
||||||
option(value="hi") Hindi
|
|
||||||
option(value="hmn") Hmong
|
|
||||||
option(value="hu") Hungarian
|
|
||||||
option(value="is") Icelandic
|
|
||||||
option(value="ig") Igbo
|
|
||||||
option(value="id") Indonesian
|
|
||||||
option(value="ga") Irish
|
|
||||||
option(value="it") Italian
|
|
||||||
option(value="ja") Japanese
|
|
||||||
option(value="jw") Javanese
|
|
||||||
option(value="kn") Kannada
|
|
||||||
option(value="kk") Kazakh
|
|
||||||
option(value="km") Khmer
|
|
||||||
option(value="rw") Kinyarwanda
|
|
||||||
option(value="ko") Korean
|
|
||||||
option(value="ku") Kurdish (Kurmanji)
|
|
||||||
option(value="ky") Kyrgyz
|
|
||||||
option(value="lo") Lao
|
|
||||||
option(value="la") Latin
|
|
||||||
option(value="lv") Latvian
|
|
||||||
option(value="lt") Lithuanian
|
|
||||||
option(value="lb") Luxembourgish
|
|
||||||
option(value="mk") Macedonian
|
|
||||||
option(value="mg") Malagasy
|
|
||||||
option(value="ms") Malay
|
|
||||||
option(value="ml") Malayalam
|
|
||||||
option(value="mt") Maltese
|
|
||||||
option(value="mi") Maori
|
|
||||||
option(value="mr") Marathi
|
|
||||||
option(value="mn") Mongolian
|
|
||||||
option(value="my") Myanmar (Burmese)
|
|
||||||
option(value="ne") Nepali
|
|
||||||
option(value="no") Norwegian
|
|
||||||
option(value="or") Odia (Oriya)
|
|
||||||
option(value="ps") Pashto
|
|
||||||
option(value="fa") Persian
|
|
||||||
option(value="pl") Polish
|
|
||||||
option(value="pt") Portuguese
|
|
||||||
option(value="pa") Punjabi
|
|
||||||
option(value="ro") Romanian
|
|
||||||
option(value="ru") Russian
|
|
||||||
option(value="sm") Samoan
|
|
||||||
option(value="gd") Scots Gaelic
|
|
||||||
option(value="sr") Serbian
|
|
||||||
option(value="st") Sesotho
|
|
||||||
option(value="sn") Shona
|
|
||||||
option(value="sd") Sindhi
|
|
||||||
option(value="si") Sinhala
|
|
||||||
option(value="sk") Slovak
|
|
||||||
option(value="sl") Slovenian
|
|
||||||
option(value="so") Somali
|
|
||||||
option(value="es") Spanish
|
|
||||||
option(value="su") Sundanese
|
|
||||||
option(value="sw") Swahili
|
|
||||||
option(value="sv") Swedish
|
|
||||||
option(value="tg") Tajik
|
|
||||||
option(value="ta") Tamil
|
|
||||||
option(value="tt") Tatar
|
|
||||||
option(value="te") Telugu
|
|
||||||
option(value="th") Thai
|
|
||||||
option(value="tr") Turkish
|
|
||||||
option(value="tk") Turkmen
|
|
||||||
option(value="uk") Ukrainian
|
|
||||||
option(value="ur") Urdu
|
|
||||||
option(value="ug") Uyghur
|
|
||||||
option(value="uz") Uzbek
|
|
||||||
option(value="vi") Vietnamese
|
|
||||||
option(value="cy") Welsh
|
|
||||||
option(value="xh") Xhosa
|
|
||||||
option(value="yi") Yiddish
|
|
||||||
option(value="yo") Yoruba
|
|
||||||
option(value="zu") Zulu
|
|
44
src/pages/widgets/icons.pug
Normal file
44
src/pages/widgets/icons.pug
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
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" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor")
|
||||||
|
rect(fill="none" height="24" width="24")
|
||||||
|
path(d="M18,2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M18,16H9V4h9V16z M3,15v-2h2v2H3z M3,9.5h2v2H3V9.5z M10,20h2v2h-2V20z M3,18.5v-2h2v2H3z M5,22c-1.1,0-2-0.9-2-2h2V22z M8.5,22h-2v-2h2V22z M13.5,22L13.5,22l0-2h2 v0C15.5,21.1,14.6,22,13.5,22z M5,6L5,6l0,2H3v0C3,6.9,3.9,6,5,6z")
|
@ -1,11 +1,9 @@
|
|||||||
|
include ../widgets/icons.pug
|
||||||
|
|
||||||
mixin links(service)
|
mixin links(service)
|
||||||
section.links
|
section.links
|
||||||
.title
|
.title
|
||||||
svg(xmlns="http://www.w3.org/2000/svg"
|
+general
|
||||||
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")
|
|
||||||
a(href="../general/general.html" data-localise="__MSG_general__" class=service == "general" ? "selected" : "") General
|
a(href="../general/general.html" data-localise="__MSG_general__" class=service == "general" ? "selected" : "") General
|
||||||
|
|
||||||
.title
|
.title
|
||||||
@ -41,10 +39,7 @@ mixin links(service)
|
|||||||
a(href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__" class=service == "wikipedia" ? "selected" : "") Wikipedia
|
a(href="../wikipedia/wikipedia.html" data-localise="__MSG_wikipedia__" class=service == "wikipedia" ? "selected" : "") Wikipedia
|
||||||
|
|
||||||
.title
|
.title
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor")
|
+medium
|
||||||
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")
|
|
||||||
a(href="../medium/medium.html" data-localise="__MSG_medium__" class=service == "medium" ? "selected" : "") Medium
|
a(href="../medium/medium.html" data-localise="__MSG_medium__" class=service == "medium" ? "selected" : "") Medium
|
||||||
|
|
||||||
.title
|
.title
|
||||||
@ -56,21 +51,17 @@ mixin links(service)
|
|||||||
a(href="../lbry/lbry.html" data-localise="__MSG_lbry__" class=service == "lbry" ? "selected" : "") LBRY/Odysee
|
a(href="../lbry/lbry.html" data-localise="__MSG_lbry__" class=service == "lbry" ? "selected" : "") LBRY/Odysee
|
||||||
|
|
||||||
.title
|
.title
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor")
|
+search
|
||||||
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")
|
|
||||||
a(href="../search/search.html" data-localise="__MSG_search__" class=service == "search" ? "selected" : "") Search
|
a(href="../search/search.html" data-localise="__MSG_search__" class=service == "search" ? "selected" : "") Search
|
||||||
|
|
||||||
.title
|
.title
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor")
|
+translate
|
||||||
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")
|
|
||||||
a(href="../translate/translate.html" data-localise="__MSG_translate__" class=service == "translate" ? "selected" : "") Translate
|
a(href="../translate/translate.html" data-localise="__MSG_translate__" class=service == "translate" ? "selected" : "") Translate
|
||||||
|
|
||||||
.title
|
.title
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor")
|
+maps
|
||||||
path(d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z")
|
|
||||||
a(href="../maps/maps.html" data-localise="__MSG_maps__" class=service == "maps" ? "selected" : "") Maps
|
a(href="../maps/maps.html" data-localise="__MSG_maps__" class=service == "maps" ? "selected" : "") Maps
|
||||||
|
|
||||||
.title
|
.title
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor")
|
+send
|
||||||
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")
|
|
||||||
a(href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__" class=service == "sendTargets" ? "selected" : "") Send Files
|
a(href="../sendTargets/sendTargets.html" data-localise="__MSG_sendFiles__" class=service == "sendTargets" ? "selected" : "") Send Files
|
Loading…
x
Reference in New Issue
Block a user