Compare commits

...

6 Commits

6 changed files with 200 additions and 26 deletions

View File

@ -99,5 +99,11 @@
},
"about": {
"message": "À propos"
},
"fetchPublicInstances": {
"message": "Rechercher des instances publiques"
},
"disable": {
"message": "Désactiver"
}
}

View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 512 512"
version="1.1"
id="svg1"
sodipodi:docname="mozhi.svg"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
inkscape:export-filename="mozhi.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="false"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
inkscape:zoom="0.85449218"
inkscape:cx="126.39086"
inkscape:cy="247.51543"
inkscape:window-width="1888"
inkscape:window-height="1060"
inkscape:window-x="32"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
showgrid="false" />
<defs
id="defs1">
<rect
x="447.58857"
y="274.24914"
width="82.898286"
height="70.866286"
id="rect6" />
<rect
x="444.70632"
y="249.71617"
width="91.789733"
height="104.34795"
id="rect5" />
<rect
x="417.77323"
y="221.92324"
width="75.620828"
height="87.946305"
id="rect4" />
<rect
x="31.513527"
y="105.19809"
width="77.838314"
height="113.70924"
id="rect3" />
<rect
x="444.05983"
y="63.136958"
width="55.320802"
height="148.09968"
id="rect2" />
</defs>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<circle
style="fill:#f57c00;stroke-width:4.40315;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.53144;fill-opacity:1"
id="path1"
cx="256"
cy="256"
r="256" />
<g
id="g11"
transform="translate(-1.6455033e-8,-8.8717685)">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:462.93px;line-height:0;font-family:FreeSerif;-inkscape-font-specification:FreeSerif;letter-spacing:0.52px;word-spacing:1.62px;white-space:pre;inline-size:0;display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none;stroke-width:3.47197"
x="110.57372"
y="306.22528"
id="text1"
transform="translate(4.9270244,-6.9413264)"
inkscape:label="Tamil"><tspan
id="tspan1"
x="110.57372"
y="306.22528"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0;font-family:FreeSerif;-inkscape-font-specification:FreeSerif;letter-spacing:0.52px;word-spacing:1.62px;stroke-width:3.47197">ழ</tspan></text>
<text
xml:space="preserve"
id="text2"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';white-space:pre;shape-inside:url(#rect2);display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none"
transform="matrix(2.799327,0,0,3.3785361,-962.26923,-98.905679)"
inkscape:label="O"><tspan
x="444.06055"
y="98.527344"
id="tspan6">O</tspan></text>
<text
xml:space="preserve"
id="text3"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';white-space:pre;shape-inside:url(#rect3);display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none"
transform="matrix(2.9268206,0,0,2.9268206,53.853031,-147.27301)"
inkscape:label="M"><tspan
x="31.513672"
y="140.58789"
id="tspan7">M</tspan></text>
<text
xml:space="preserve"
id="text4"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';white-space:pre;shape-inside:url(#rect4);display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none"
transform="matrix(3.1593397,0,0,2.8648022,-1159.7463,-343.82656)"
inkscape:label="Z"><tspan
x="417.77344"
y="257.31445"
id="tspan8">Z</tspan></text>
<text
xml:space="preserve"
id="text5"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';white-space:pre;shape-inside:url(#rect5);display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none"
transform="matrix(2.900492,0,0,2.900492,-998.44727,-381.36539)"
inkscape:label="H"><tspan
x="444.70703"
y="285.10742"
id="tspan9">H</tspan></text>
<g
id="g10"
inkscape:label="I">
<path
id="path10"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';white-space:pre;shape-inside:url(#rect6);display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none"
d="m 452.34766,289.85002 c 0.22541,-0.20952 0.45142,-0.41589 0.67406,-0.63903 0.32908,-0.32981 0.65502,-0.67506 0.97635,-1.03568 0.32133,-0.36061 0.63824,-0.73678 0.94979,-1.12946 0.31155,-0.39269 0.61727,-0.80176 0.91702,-1.22778 0.29975,-0.42602 0.59324,-0.86886 0.87916,-1.32948 0.28593,-0.46063 0.56447,-0.93921 0.83453,-1.43571 0.16921,-0.31108 0.32867,-0.64231 0.491,-0.96787 h -7.06609 c -0.0345,0.0663 -0.0646,0.13695 -0.0994,0.20284 -0.32015,0.60473 -0.65585,1.19202 -1.00573,1.75663 -0.32204,0.51971 -0.65924,1.01474 -1.0046,1.49221 l 3.45395,1.58826 z"
transform="matrix(3.4567616,0,0,3.4567616,-1200.9959,-724.14164)" />
<path
id="path9"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';white-space:pre;shape-inside:url(#rect6);display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none"
d="m 451.63291,310.64486 h 10.2347 v -3.43981 l -3.47993,-1.60013 v -18.47997 l 3.47993,-1.60013 v -3.43981 h -3.79804 c -0.16233,0.32556 -0.32179,0.65679 -0.491,0.96787 -0.27006,0.4965 -0.5486,0.97508 -0.83453,1.43571 -0.28592,0.46062 -0.57941,0.90346 -0.87916,1.32948 -0.29975,0.42602 -0.60547,0.83509 -0.91702,1.22778 -0.31155,0.39268 -0.62846,0.76885 -0.94979,1.12946 -0.32133,0.36062 -0.64727,0.70587 -0.97635,1.03568 -0.22264,0.22314 -0.44865,0.42951 -0.67406,0.63903 v 15.18763 h 0.14634 c 0.46872,0 0.87071,0.0248 1.20969,0.0729 0.33899,0.0481 0.61522,0.11925 0.83284,0.21132 0.10881,0.046 0.20303,0.0975 0.28307,0.15368 0.08,0.0562 0.14601,0.11772 0.19832,0.18363 0.0523,0.0659 0.0908,0.13625 0.11639,0.21132 0.0256,0.0751 0.0384,0.15474 0.0384,0.23844 0,0.13392 -0.0422,0.48538 -0.15312,0.93736 -0.0554,0.22599 -0.12811,0.47691 -0.22149,0.73847 -0.0934,0.26157 -0.20712,0.53392 -0.34522,0.80176 -0.13811,0.26784 -0.30024,0.53151 -0.48987,0.77633 -0.18964,0.24482 -0.4069,0.47082 -0.65486,0.66333 -0.12398,0.0963 -0.25567,0.18392 -0.39551,0.2616 -0.13984,0.0777 -0.28812,0.14513 -0.44466,0.20058 -0.15655,0.0554 -0.32142,0.0987 -0.49552,0.12826 -0.10754,0.0183 -0.22508,0.021 -0.33958,0.0283 z"
transform="matrix(3.4567616,0,0,3.4567616,-1200.9959,-724.14164)" />
<path
id="path8"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';white-space:pre;shape-inside:url(#rect6);display:inline;fill:#fbe9e7;fill-opacity:1;stroke:none"
d="m 451.63291,310.64486 c 0.1145,-0.007 0.23204,-0.01 0.33958,-0.0283 0.1741,-0.0295 0.33897,-0.0728 0.49552,-0.12826 0.15654,-0.0555 0.30482,-0.12289 0.44466,-0.20058 0.13984,-0.0777 0.27153,-0.16534 0.39551,-0.2616 0.24796,-0.19251 0.46522,-0.41851 0.65486,-0.66333 0.18963,-0.24482 0.35176,-0.50849 0.48987,-0.77633 0.1381,-0.26784 0.25184,-0.54019 0.34522,-0.80176 0.0934,-0.26156 0.16604,-0.51248 0.22149,-0.73847 0.1109,-0.45198 0.15312,-0.80344 0.15312,-0.93736 0,-0.0837 -0.0128,-0.16337 -0.0384,-0.23844 -0.0256,-0.0751 -0.0641,-0.1454 -0.11639,-0.21132 -0.0523,-0.0659 -0.11828,-0.12739 -0.19832,-0.18363 -0.08,-0.0562 -0.17426,-0.10765 -0.28307,-0.15368 -0.21762,-0.0921 -0.49385,-0.16319 -0.83284,-0.21132 -0.33898,-0.0481 -0.74097,-0.0729 -1.20969,-0.0729 h -0.14634 v 0.56727 l -3.47994,1.60013 v 3.43981 z"
transform="matrix(3.4567616,0,0,3.4567616,-1200.9959,-724.14164)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -172,6 +172,9 @@ function redirect(url, type, initiator, forceRedirection) {
case "simplyTranslate": {
return `${randomInstance}/${url.search}`
}
case "mozhi": {
return `${randomInstance}`
}
case "libreTranslate": {
let search = url.search
.replace("sl", "source")
@ -372,7 +375,7 @@ function redirect(url, type, initiator, forceRedirection) {
}
case "anonymousOverflow": {
if (url.hostname == "stackoverflow.com") {
const threadID = /\/(\d+)\/?$/.exec(url.pathname)
const threadID = /^\/a\/(\d+)\/?/.exec(url.pathname)
if (threadID) return `${randomInstance}/questions/${threadID[1]}${url.search}`
return `${randomInstance}${url.pathname}${url.search}`
}
@ -529,6 +532,7 @@ function redirect(url, type, initiator, forceRedirection) {
}
return `${randomInstance}`
}
case "twineo":
case "safetwitch": {
if (url.hostname.startsWith("clips.")) {
return `${randomInstance}/clip${url.pathname}${url.search}`
@ -659,6 +663,7 @@ const defaultInstances = {
'quetre': ['https://quetre.iket.me'],
'libremdb': ['https://libremdb.iket.me'],
'simplyTranslate': ['https://simplytranslate.org'],
'mozhi': ['https://mozhi.aryak.me'],
'searxng': ['https://search.bus-hit.me'],
'4get': ['https://4get.ca'],
'rimgo': ['https://rimgo.vern.cc'],
@ -685,6 +690,7 @@ const defaultInstances = {
'indestructables': ['https://indestructables.private.coffee'],
'destructables': ['https://ds.vern.cc'],
'safetwitch': ['https://safetwitch.drgns.space'],
'twineo': ['https://twineo.exozy.me'],
'proxigram': ['https://proxigram.privacyfrontends.repl.co'],
'tuboYoutube': ['https://tubo.migalmoreno.com'],
'tuboSoundcloud': ['https://tubo.migalmoreno.com'],

View File

@ -183,6 +183,13 @@
"instanceList": true,
"url": "https://codeberg.org/dragongoose/safetwitch",
"localhost": false
},
"twineo": {
"name": "Twineo",
"embeddable": true,
"instanceList": true,
"url": "https://codeberg.org/CloudyyUw/twineo",
"localhost": false
}
},
"targets": [
@ -523,6 +530,12 @@
"url": "https://git.sr.ht/~metalune/simplytranslate_web",
"localhost": true
},
"mozhi": {
"name": "Mozhi",
"instanceList": true,
"url": "https://codeberg.org/aryak/mozhi",
"localhost": false
},
"libreTranslate": {
"name": "LibreTranslate",
"instanceList": true,

View File

@ -68,34 +68,29 @@ importSettingsElement.addEventListener("change", () => {
const exportSettingsSync = document.getElementById("export-settings-sync")
const importSettingsSync = document.getElementById("import-settings-sync")
const importSettingsSyncText = document.getElementById("import_settings_sync_text")
if (!isChrome) {
exportSettingsSync.addEventListener("click", async () => {
let options = await utils.getOptions()
options.version = browser.runtime.getManifest().version
browser.storage.sync.set({ options }, () => location.reload())
})
importSettingsSync.addEventListener("click", () => {
function importError() {
importSettingsSyncText.innerHTML = '<span style="color:red;">Error!</span>'
setTimeout(() => (importSettingsSyncText.innerHTML = oldHTML), 1000)
exportSettingsSync.addEventListener("click", async () => {
let options = await utils.getOptions()
options.version = browser.runtime.getManifest().version
browser.storage.sync.set({ options }, () => location.reload())
})
importSettingsSync.addEventListener("click", () => {
function importError() {
importSettingsSyncText.innerHTML = '<span style="color:red;">Error!</span>'
setTimeout(() => (importSettingsSyncText.innerHTML = oldHTML), 1000)
}
const oldHTML = importSettingsSyncText.innerHTML
importSettingsSyncText.innerHTML = "..."
browser.storage.sync.get({ options }, r => {
const options = r.options
if (options.version == browser.runtime.getManifest().version) {
browser.storage.local.set({ options }, () => location.reload())
} else {
importError()
}
const oldHTML = importSettingsSyncText.innerHTML
importSettingsSyncText.innerHTML = "..."
browser.storage.sync.get({ options }, r => {
const options = r.options
if (options.version == browser.runtime.getManifest().version) {
browser.storage.local.set({ options }, () => location.reload())
} else {
importError()
}
})
})
} else {
exportSettingsSync.style.display = 'none'
importSettingsSync.style.display = 'none'
}
})
const resetSettings = document.getElementById("reset-settings")
resetSettings.addEventListener("click", async () => {