Added LibreTranslate
This commit is contained in:
parent
1898a17f04
commit
cd01a7083c
|
@ -163,6 +163,11 @@ function redirect(url, type, initiator) {
|
||||||
return `freetube://https://youtu.be${url.pathname}${url.search}`.replace(/watch\?v=/, "")
|
return `freetube://https://youtu.be${url.pathname}${url.search}`.replace(/watch\?v=/, "")
|
||||||
case "simplyTranslate":
|
case "simplyTranslate":
|
||||||
return `${randomInstance}/${url.search}`
|
return `${randomInstance}/${url.search}`
|
||||||
|
case "libreTranslate":
|
||||||
|
return `${randomInstance}/${url.search}`
|
||||||
|
.replace(/(?<=\/?)sl/, "source")
|
||||||
|
.replace(/(?<=&)tl/, "target")
|
||||||
|
.replace(/(?<=&)text/, "q")
|
||||||
case "osm": {
|
case "osm": {
|
||||||
if (initiator && initiator.host === "earth.google.com") return
|
if (initiator && initiator.host === "earth.google.com") return
|
||||||
const travelModes = {
|
const travelModes = {
|
||||||
|
|
|
@ -496,6 +496,10 @@
|
||||||
},
|
},
|
||||||
"name": "Lingva Translate",
|
"name": "Lingva Translate",
|
||||||
"instanceList": true
|
"instanceList": true
|
||||||
|
},
|
||||||
|
"libreTranslate": {
|
||||||
|
"name": "LibreTranslate",
|
||||||
|
"instanceList": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": ["^https?:\\/{2}translate\\.google(\\.[a-z]{2,3}){1,2}\\/", "^https?:\\/{2}translate\\.libredirect\\.invalid"],
|
"targets": ["^https?:\\/{2}translate\\.google(\\.[a-z]{2,3}){1,2}\\/", "^https?:\\/{2}translate\\.libredirect\\.invalid"],
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
"https://scribe.rawbit.ninja",
|
"https://scribe.rawbit.ninja",
|
||||||
"https://lingva.garudalinux.org",
|
"https://lingva.garudalinux.org",
|
||||||
"https://translate.dr460nf1r3.org",
|
"https://translate.dr460nf1r3.org",
|
||||||
|
"https://libretranslate.com",
|
||||||
"https://searx.run",
|
"https://searx.run",
|
||||||
"https://searx.org",
|
"https://searx.org",
|
||||||
"https://search.garudalinux.org",
|
"https://search.garudalinux.org",
|
||||||
|
@ -77,11 +78,13 @@
|
||||||
"https://libreddit.notyourcomputer.net",
|
"https://libreddit.notyourcomputer.net",
|
||||||
"https://teddit.ggc-project.de",
|
"https://teddit.ggc-project.de",
|
||||||
"https://teddit.tokhmi.xyz",
|
"https://teddit.tokhmi.xyz",
|
||||||
|
"https://wiki.privacytools.io",
|
||||||
"https://quetre.odyssey346.dev",
|
"https://quetre.odyssey346.dev",
|
||||||
"https://st.odyssey346.dev",
|
"https://st.odyssey346.dev",
|
||||||
"https://jsearch.pw",
|
"https://jsearch.pw",
|
||||||
"https://searx.gnu.style",
|
"https://searx.gnu.style",
|
||||||
"https://searx.semipvt.com",
|
"https://searx.semipvt.com",
|
||||||
|
"https://searx.tyil.nl",
|
||||||
"https://etsi.me",
|
"https://etsi.me",
|
||||||
"https://search.zzls.xyz",
|
"https://search.zzls.xyz",
|
||||||
"https://searx.ericaftereric.top",
|
"https://searx.ericaftereric.top",
|
||||||
|
|
|
@ -6,9 +6,11 @@
|
||||||
"https://invidious.snopyta.org",
|
"https://invidious.snopyta.org",
|
||||||
"https://invidious.kavin.rocks",
|
"https://invidious.kavin.rocks",
|
||||||
"https://inv.riverside.rocks",
|
"https://inv.riverside.rocks",
|
||||||
|
"https://invidio.xamh.de",
|
||||||
"https://y.com.sb",
|
"https://y.com.sb",
|
||||||
"https://yt.artemislena.eu",
|
"https://yt.artemislena.eu",
|
||||||
"https://invidious.tiekoetter.com",
|
"https://invidious.tiekoetter.com",
|
||||||
|
"https://invidious.sethforprivacy.com",
|
||||||
"https://invidious.flokinet.to",
|
"https://invidious.flokinet.to",
|
||||||
"https://inv.bp.projectsegfau.lt",
|
"https://inv.bp.projectsegfau.lt",
|
||||||
"https://inv.vern.cc",
|
"https://inv.vern.cc",
|
||||||
|
@ -19,13 +21,11 @@
|
||||||
"https://invidious.slipfox.xyz",
|
"https://invidious.slipfox.xyz",
|
||||||
"https://invidious.esmailelbob.xyz",
|
"https://invidious.esmailelbob.xyz",
|
||||||
"https://youtube.076.ne.jp",
|
"https://youtube.076.ne.jp",
|
||||||
"https://invidious.sethforprivacy.com",
|
"https://invidious.namazso.eu"
|
||||||
"https://invidious.namazso.eu",
|
|
||||||
"https://invidio.xamh.de"
|
|
||||||
],
|
],
|
||||||
"tor": [
|
"tor": [
|
||||||
|
"http://w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion",
|
||||||
"http://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion",
|
"http://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion",
|
||||||
"http://kbjggqkzv65ivcqj6bumvp337z6264huv5kpkwuv6gu5yjiskvan7fad.onion",
|
|
||||||
"http://grwp24hodrefzvjjuccrkw3mjq4tzhaaq32amf33dzpmuxe7ilepcmad.onion",
|
"http://grwp24hodrefzvjjuccrkw3mjq4tzhaaq32amf33dzpmuxe7ilepcmad.onion",
|
||||||
"http://osbivz6guyeahrwp2lnwyjk2xos342h4ocsxyqrlaopqjuhwn2djiiyd.onion",
|
"http://osbivz6guyeahrwp2lnwyjk2xos342h4ocsxyqrlaopqjuhwn2djiiyd.onion",
|
||||||
"http://u2cvlit75owumwpy4dj2hsmvkq7nvrclkpht7xgyye2pyoxhpmclkrad.onion",
|
"http://u2cvlit75owumwpy4dj2hsmvkq7nvrclkpht7xgyye2pyoxhpmclkrad.onion",
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
"http://inv.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
|
"http://inv.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
|
||||||
"http://am74vkcrjp2d5v36lcdqgsj2m6x36tbrkhsruoegwfcizzabnfgf5zyd.onion",
|
"http://am74vkcrjp2d5v36lcdqgsj2m6x36tbrkhsruoegwfcizzabnfgf5zyd.onion",
|
||||||
"http://ng27owmagn5amdm7l5s3rsqxwscl5ynppnis5dqcasogkyxcfqn7psid.onion",
|
"http://ng27owmagn5amdm7l5s3rsqxwscl5ynppnis5dqcasogkyxcfqn7psid.onion",
|
||||||
"http://w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion"
|
"http://kbjggqkzv65ivcqj6bumvp337z6264huv5kpkwuv6gu5yjiskvan7fad.onion"
|
||||||
],
|
],
|
||||||
"i2p": [],
|
"i2p": [],
|
||||||
"loki": []
|
"loki": []
|
||||||
|
@ -535,6 +535,24 @@
|
||||||
"i2p": [],
|
"i2p": [],
|
||||||
"loki": []
|
"loki": []
|
||||||
},
|
},
|
||||||
|
"libreTranslate": {
|
||||||
|
"clearnet": [
|
||||||
|
"https://libretranslate.com",
|
||||||
|
"https://libretranslate.de",
|
||||||
|
"https://translate.argosopentech.com",
|
||||||
|
"https://translate.api.skitzen.com",
|
||||||
|
"https://translate.fortytwo-it.com",
|
||||||
|
"https://translate.terraprint.co",
|
||||||
|
"https://lt.vern.cc"
|
||||||
|
],
|
||||||
|
"tor": [
|
||||||
|
"http://lt.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"
|
||||||
|
],
|
||||||
|
"i2p": [
|
||||||
|
"http://vernf45n7mxwqnp5riaax7p67pwcl7wcefdcnqqvim7ckdx4264a.b32.i2p"
|
||||||
|
],
|
||||||
|
"loki": []
|
||||||
|
},
|
||||||
"searx": {
|
"searx": {
|
||||||
"clearnet": [
|
"clearnet": [
|
||||||
"https://dynabyte.ca",
|
"https://dynabyte.ca",
|
||||||
|
@ -572,12 +590,10 @@
|
||||||
"https://suche.uferwerk.org",
|
"https://suche.uferwerk.org",
|
||||||
"https://sx.catgirl.cloud",
|
"https://sx.catgirl.cloud",
|
||||||
"https://timdor.noip.me/searx",
|
"https://timdor.noip.me/searx",
|
||||||
"https://xo.wtf",
|
|
||||||
"https://searx.roflcopter.fr"
|
"https://searx.roflcopter.fr"
|
||||||
],
|
],
|
||||||
"tor": [
|
"tor": [
|
||||||
"http://3afisqjw2rxm6z7mmstyt5rx75qfqrgxnkzftknbp2vhipr2nrmrjdyd.onion",
|
"http://3afisqjw2rxm6z7mmstyt5rx75qfqrgxnkzftknbp2vhipr2nrmrjdyd.onion",
|
||||||
"http://w5rl6wsd7mzj4bdkbuqvzidet5osdsm5jhg2f7nvfidakfq5exda5wid.onion",
|
|
||||||
"http://yra4tke2pwcnatxjkufpw6kvebu3h3ti2jca2lcdpgx3mpwol326lzid.onion",
|
"http://yra4tke2pwcnatxjkufpw6kvebu3h3ti2jca2lcdpgx3mpwol326lzid.onion",
|
||||||
"http://z5vawdol25vrmorm4yydmohsd4u6rdoj2sylvoi3e3nqvxkvpqul7bqd.onion",
|
"http://z5vawdol25vrmorm4yydmohsd4u6rdoj2sylvoi3e3nqvxkvpqul7bqd.onion",
|
||||||
"http://zbuc3bbzbfdqqo2x46repx2ddajbha6fpsjeeptjhhhhzji3zopxdqyd.onion",
|
"http://zbuc3bbzbfdqqo2x46repx2ddajbha6fpsjeeptjhhhhzji3zopxdqyd.onion",
|
||||||
|
@ -667,9 +683,11 @@
|
||||||
"https://trydex.tk/searxng",
|
"https://trydex.tk/searxng",
|
||||||
"https://www.gruble.de",
|
"https://www.gruble.de",
|
||||||
"https://www.webrats.xyz",
|
"https://www.webrats.xyz",
|
||||||
"https://xcxc.ml"
|
"https://xcxc.ml",
|
||||||
|
"https://xo.wtf"
|
||||||
],
|
],
|
||||||
"tor": [
|
"tor": [
|
||||||
|
"http://w5rl6wsd7mzj4bdkbuqvzidet5osdsm5jhg2f7nvfidakfq5exda5wid.onion",
|
||||||
"http://4n53nafyi77iplnbrpmxnp3x4exbswwxigujaxy3b37fvr7bvlopxeyd.onion",
|
"http://4n53nafyi77iplnbrpmxnp3x4exbswwxigujaxy3b37fvr7bvlopxeyd.onion",
|
||||||
"http://privateoz3u5utrimal2edr56j3r5caakektxxgixigdkycuxigvquid.onion",
|
"http://privateoz3u5utrimal2edr56j3r5caakektxxgixigdkycuxigvquid.onion",
|
||||||
"http://b6sxmon57qza6dt36li7huabie5ntrvjr4q5rc2vvbn4hqvzd4phrvyd.onion",
|
"http://b6sxmon57qza6dt36li7huabie5ntrvjr4q5rc2vvbn4hqvzd4phrvyd.onion",
|
||||||
|
|
|
@ -309,7 +309,7 @@ def bibliogram():
|
||||||
|
|
||||||
|
|
||||||
def libreddit():
|
def libreddit():
|
||||||
fetchRegexList('libreddit', 'Libreddit', 'https://raw.githubusercontent.com/spikecodes/libreddit/master/README.md', r"\| \[.*\]\(([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}.*\|.*\|")
|
fetchJsonList('libreddit', 'Libreddit', 'https://github.com/libbacon/libreddit-instances/raw/master/instances.json', {'clearnet': 'url', 'tor': 'onion', 'i2p': 'i2p', 'loki': None}, True)
|
||||||
|
|
||||||
|
|
||||||
def teddit():
|
def teddit():
|
||||||
|
@ -433,6 +433,10 @@ def facil():
|
||||||
fetchFromFile('facil', 'FacilMap')
|
fetchFromFile('facil', 'FacilMap')
|
||||||
|
|
||||||
|
|
||||||
|
def libreTranslate():
|
||||||
|
fetchRegexList('libreTranslate', 'LibreTranslate', 'https://raw.githubusercontent.com/LibreTranslate/LibreTranslate/main/README.md', r"\[(?:[^\s\/]+\.)+[a-zA-Z0-9]+\]\((https?:\/{2}(?:[^\s\/]+\.)+[a-zA-Z0-9]+)\/?\)\|")
|
||||||
|
|
||||||
|
|
||||||
def peertube():
|
def peertube():
|
||||||
r = requests.get(
|
r = requests.get(
|
||||||
'https://instances.joinpeertube.org/api/v1/instances?start=0&count=1045&sort=-createdAt')
|
'https://instances.joinpeertube.org/api/v1/instances?start=0&count=1045&sort=-createdAt')
|
||||||
|
@ -470,6 +474,7 @@ quetre()
|
||||||
libremdb()
|
libremdb()
|
||||||
simplytranslate()
|
simplytranslate()
|
||||||
linvgatranslate()
|
linvgatranslate()
|
||||||
|
libreTranslate()
|
||||||
searx_searxng()
|
searx_searxng()
|
||||||
whoogle()
|
whoogle()
|
||||||
librex()
|
librex()
|
||||||
|
|
|
@ -20,17 +20,6 @@ function initDefaults() {
|
||||||
}
|
}
|
||||||
|
|
||||||
browser.runtime.onInstalled.addListener(details => {
|
browser.runtime.onInstalled.addListener(details => {
|
||||||
// if (details.reason == 'install' || (details.reason == "update" && details.previousVersion != browser.runtime.getManifest().version)) {
|
|
||||||
// if (details.reason == "update")
|
|
||||||
// browser.storage.local.get(null, r => {
|
|
||||||
// if (r.theme) {
|
|
||||||
// const old = encodeURIComponent(JSON.stringify(r))
|
|
||||||
// browser.tabs.create({ url: browser.runtime.getURL(`/pages/background/reset_warning.html?data=${old}`) });
|
|
||||||
// }
|
|
||||||
// initDefaults();
|
|
||||||
// })
|
|
||||||
// else initDefaults();
|
|
||||||
// }
|
|
||||||
switch (details.reason) {
|
switch (details.reason) {
|
||||||
case "install":
|
case "install":
|
||||||
initDefaults()
|
initDefaults()
|
||||||
|
|
|
@ -2863,6 +2863,7 @@
|
||||||
<select id="translate-frontend">
|
<select id="translate-frontend">
|
||||||
<option value="simplyTranslate">SimplyTranslate</option>
|
<option value="simplyTranslate">SimplyTranslate</option>
|
||||||
<option value="lingva">Lingva Translate</option>
|
<option value="lingva">Lingva Translate</option>
|
||||||
|
<option value="libreTranslate">LibreTranslate</option>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3058,6 +3059,102 @@
|
||||||
<div class="checklist custom-checklist"></div>
|
<div class="checklist custom-checklist"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="libreTranslate">
|
||||||
|
<div class="clearnet">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
</div>
|
||||||
|
<div class="checklist"></div>
|
||||||
|
<hr>
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
|
||||||
|
</div>
|
||||||
|
<form class="custom-instance-form">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<input class="custom-instance" placeholder="http://libreTranslate.org" type="url">
|
||||||
|
<button class="add add-instance" type="submit">
|
||||||
|
<svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
|
||||||
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="checklist custom-checklist"></div>
|
||||||
|
<div class="buttons buttons-inline">
|
||||||
|
<label class="button button-inline" id="latency-libreTranslate-label" for="latency-libreTranslate">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
||||||
|
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path>
|
||||||
|
</svg>
|
||||||
|
<x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x>
|
||||||
|
</label>
|
||||||
|
<input class="button button-inline" id="latency-libreTranslate" style="display:none;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tor">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
</div>
|
||||||
|
<div class="checklist"></div>
|
||||||
|
<hr>
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
|
||||||
|
</div>
|
||||||
|
<form class="custom-instance-form">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<input class="custom-instance" placeholder="http://libreTranslate.onion" type="url">
|
||||||
|
<button class="add add-instance" type="submit">
|
||||||
|
<svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
|
||||||
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="checklist custom-checklist"></div>
|
||||||
|
</div>
|
||||||
|
<div class="i2p">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
</div>
|
||||||
|
<div class="checklist"></div>
|
||||||
|
<hr>
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
|
||||||
|
</div>
|
||||||
|
<form class="custom-instance-form">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<input class="custom-instance" placeholder="http://libreTranslate.i2p" type="url">
|
||||||
|
<button class="add add-instance" type="submit">
|
||||||
|
<svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
|
||||||
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="checklist custom-checklist"></div>
|
||||||
|
</div>
|
||||||
|
<div class="loki">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
||||||
|
</div>
|
||||||
|
<div class="checklist"></div>
|
||||||
|
<hr>
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
|
||||||
|
</div>
|
||||||
|
<form class="custom-instance-form">
|
||||||
|
<div class="some-block option-block">
|
||||||
|
<input class="custom-instance" placeholder="http://libreTranslate.loki" type="url">
|
||||||
|
<button class="add add-instance" type="submit">
|
||||||
|
<svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
|
||||||
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="checklist custom-checklist"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue