From 8c3c716d1b351cf97dadbae8e38c7e367720b592 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Tue, 24 Oct 2023 09:25:53 +0300 Subject: [PATCH] Added Mozhi https://github.com/libredirect/browser_extension/issues/840 --- src/assets/images/mozhi-icon.svg | 154 +++++++++++++++++++++++++++++ src/assets/javascripts/services.js | 4 + src/config.json | 6 ++ 3 files changed, 164 insertions(+) create mode 100644 src/assets/images/mozhi-icon.svg diff --git a/src/assets/images/mozhi-icon.svg b/src/assets/images/mozhi-icon.svg new file mode 100644 index 00000000..b04b5416 --- /dev/null +++ b/src/assets/images/mozhi-icon.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + O + M + Z + H + + + + + + + + diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index cfaba48e..e56128c8 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -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") @@ -659,6 +662,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'], diff --git a/src/config.json b/src/config.json index 8e73d685..0f799adc 100644 --- a/src/config.json +++ b/src/config.json @@ -523,6 +523,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,