Update translators
This commit is contained in:
parent
c63abf4809
commit
962234418b
@ -21,7 +21,8 @@ for f in it:
|
||||
|
||||
print(',"translators":{')
|
||||
comma = ''
|
||||
for name, file_name in files.items():
|
||||
for name in sorted(files.keys()):
|
||||
file_name = files[name]
|
||||
print(' {}"{}": {{"files":['.format(comma, name))
|
||||
comma = ','
|
||||
md5 = hashlib.md5()
|
||||
|
@ -55,7 +55,7 @@ function translate(text, from, to) {
|
||||
}
|
||||
|
||||
let url = 'https://papago.naver.com/?sk=auto&tk=' + to + '&st=' + encodeURIComponent(text);
|
||||
window.location = encodeURI(url);
|
||||
window.location = url;
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
@ -23,15 +23,6 @@ function translate(text, from, to) {
|
||||
active = true;
|
||||
|
||||
let langs = 'lang=' + from + '-' + to;
|
||||
if (window.location.href.indexOf('//translate.yandex') !== -1
|
||||
&& window.location.href.indexOf(langs) !== -1) {
|
||||
document.querySelector('div#fakeArea').value = text;
|
||||
document.querySelector('textarea#textarea').value = text;
|
||||
document.querySelector('div#textbox').dispatchEvent(
|
||||
new Event("input", { bubbles: true, cancelable: true }));
|
||||
return;
|
||||
}
|
||||
|
||||
let url = 'https://translate.yandex.ru/?' + langs + '&text=' + encodeURIComponent(text);
|
||||
console.log("setting url", url);
|
||||
window.location = url;
|
||||
|
27
updates.json
27
updates.json
@ -573,23 +573,26 @@
|
||||
|
||||
|
||||
,"translators":{
|
||||
"bing": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/bing.js", "path":"$translators$/bing.js", "md5":"fc69c1e05a3462a88131ee0a8422ad89"}
|
||||
"baidu": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/baidu.js", "path":"$translators$/baidu.js", "md5":"93f7bca9b792877350f54a1d47767583", "size":1306}
|
||||
]}
|
||||
,"google": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/google.js", "path":"$translators$/google.js", "md5":"58128258211838ac23c84d18edc9c268"}
|
||||
]}
|
||||
,"google_api": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/google_api.js", "path":"$translators$/google_api.js", "md5":"087dfe395c6ee803bf0e69693a27a41a"}
|
||||
]}
|
||||
,"yandex": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/yandex.js", "path":"$translators$/yandex.js", "md5":"931306b7cf54c529638a730ad2ada0ef"}
|
||||
,"bing": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/bing.js", "path":"$translators$/bing.js", "md5":"5c20fe78c25a4f9e97160fdc3bc4572c", "size":1277}
|
||||
]}
|
||||
,"deepl": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/deepl.js", "path":"$translators$/deepl.js", "md5":"eb333c2e210dc955d523e68339e68b84"}
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/deepl.js", "path":"$translators$/deepl.js", "md5":"a6dfae3f63ca3fa9c7edbfaff87600e4", "size":1596}
|
||||
]}
|
||||
,"google": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/google.js", "path":"$translators$/google.js", "md5":"16ffead93035e08e8db13279cc8b65a7", "size":1260}
|
||||
]}
|
||||
,"google_api": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/google_api.js", "path":"$translators$/google_api.js", "md5":"ba0d5fb0e156cccd47e048389c2762fa", "size":865}
|
||||
]}
|
||||
,"papago": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/papago.js", "path":"$translators$/papago.js", "md5":"27d8031bcab27cf2f14c815c60785f0b"}
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/papago.js", "path":"$translators$/papago.js", "md5":"538bb7280192b18d15d24b07adae2638", "size":1956}
|
||||
]}
|
||||
,"yandex": {"files":[
|
||||
{"url":"https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/yandex.js", "path":"$translators$/yandex.js", "md5":"f8c625e8f6ced4a9f5be6791a6ee3f87", "size":957}
|
||||
]}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user