aboutsummaryrefslogtreecommitdiff
path: root/src/app/lang.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2021-12-29 22:59:47 +0100
committer0neGal <mail@0negal.com>2021-12-29 22:59:47 +0100
commit474f2ae54000463a0a2dfc84ad678a7620cc3d44 (patch)
tree3ead3d9fb078daefed14392db88c1cb3a4af8a7e /src/app/lang.js
parent4abe10aebdfa06c9b9c31c98f084d511e3e2e319 (diff)
downloadViper-474f2ae54000463a0a2dfc84ad678a7620cc3d44.tar.gz
Viper-474f2ae54000463a0a2dfc84ad678a7620cc3d44.zip
proper responsiveness for all languages
This should more or less ensure everything remains responsive even if the language is one with very long strings.
Diffstat (limited to 'src/app/lang.js')
-rw-r--r--src/app/lang.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/app/lang.js b/src/app/lang.js
index 8cf3d4b..5cc9708 100644
--- a/src/app/lang.js
+++ b/src/app/lang.js
@@ -1,10 +1,12 @@
-html = document.body.innerHTML.split("%%");
+function setlang() {
+ html = document.body.innerHTML.split("%%");
-for (let i = 0; i < html.length; i++) {
- if (html[i][0] != " " &&
- html[i][html[i].length - 1] != " ") {
- html[i] = lang(html[i])
+ for (let i = 0; i < html.length; i++) {
+ if (html[i][0] != " " &&
+ html[i][html[i].length - 1] != " ") {
+ html[i] = lang(html[i])
+ }
}
-}
-document.body.innerHTML = html.join("");
+ document.body.innerHTML = html.join("");
+}