From dbd8c6b152acc1188d2edd288488aa2da8f6310b Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sat, 8 Jun 2024 18:02:48 +0200 Subject: initial commit to better modularize frontend Far from done, but this pretty much splits everything inside `src/app/main.js` into separate files. --- src/app/lang.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/app/lang.js (limited to 'src/app/lang.js') diff --git a/src/app/lang.js b/src/app/lang.js deleted file mode 100644 index f1c31d3..0000000 --- a/src/app/lang.js +++ /dev/null @@ -1,19 +0,0 @@ -// Replaces strings in the HTML will language strings properly. This -// searches for %%%%, aka, %%gui.exit%% will be replaced with -// "Exit", this works without issues. -function setlang() { - // Finds %%%% strings - html = document.body.innerHTML.split("%%"); - - for (let i = 0; i < html.length; i++) { - // Simply checks to make sure it is actually a lang string. - if (html[i][0] != " " && - html[i][html[i].length - 1] != " ") { - // Replaces it with it's string - html[i] = lang(html[i]); - } - } - - // Replaces the original HTML with the translated/replaced HTML - document.body.innerHTML = html.join(""); -} -- cgit v1.2.3