From 6e9edfbd9384aaae3fd83a9b011e8f2f2f4973e2 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 29 Jan 2022 11:24:15 +0100 Subject: Fix scrolling not working on Safari --- htdocs/public/metranslator/api/index.ejs | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 htdocs/public/metranslator/api/index.ejs (limited to 'htdocs/public/metranslator/api/index.ejs') diff --git a/htdocs/public/metranslator/api/index.ejs b/htdocs/public/metranslator/api/index.ejs deleted file mode 100644 index fa915b4..0000000 --- a/htdocs/public/metranslator/api/index.ejs +++ /dev/null @@ -1,31 +0,0 @@ -<% - - res.writeHead(200, {'Content-Type': "application/json"}); - - if (get['t']) { - if (get['t'] === "en") { - target = "en"; - } else { - target = "mt"; - } - } else { - res.end(); - } - - if (get['u']) { - text = get['u']; - - if (text.length > 500) { - res.end(); - } - - text = text.split("\"").join("''"); - } else { - res.end(); - } - - aw = JSON.parse(child_process.execSync(`cd /mnt/metranslator-api && node index.js api ${target} "${text}"`).toString()); - last = child_process.execSync("cd /mnt/metranslator-api && git log -1 --pretty=format:'%an'").toString() - aw["system"]["version"] = aw["system"]["version"] + "-" + fs.readFileSync("/mnt/metranslator-api/.git/refs/heads/trunk").toString().substr(0, 8); - aw["system"]["last_author"] = last; - aw["call"] = "cd /mnt/metranslator-api && node index.js api {$target} \"{$text}\""; \ No newline at end of file -- cgit