aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-06-08 14:55:57 -0400
committerBobby <[email protected]>2023-06-08 14:55:57 -0400
commit1b18fe9c97e4eb8b8e480af8c2ebebd4b36f478a (patch)
treeaa0400e74dc3dcc8e338dd6d945ae34f9baad2cd /static
parent3e1d16f0af57fbdcc9a45764eddfbc481952ed6c (diff)
downloadthatcomputerscientist-1b18fe9c97e4eb8b8e480af8c2ebebd4b36f478a.tar.xz
thatcomputerscientist-1b18fe9c97e4eb8b8e480af8c2ebebd4b36f478a.zip
Allow Translation to occur when TL is loaded
Diffstat (limited to 'static')
-rw-r--r--static/css/styles.css5
-rw-r--r--static/js/tl.js15
2 files changed, 13 insertions, 7 deletions
diff --git a/static/css/styles.css b/static/css/styles.css
index 491780c7..228234b4 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -18,6 +18,11 @@ body {
display: none !important;
}
+font:hover, .VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q {
+ background: none !important;
+ box-shadow: none !important;
+}
+
input,
textarea {
font-family: 'Mali', sans-serif !important;
diff --git a/static/js/tl.js b/static/js/tl.js
index dd6a34b8..9fa8808f 100644
--- a/static/js/tl.js
+++ b/static/js/tl.js
@@ -14,8 +14,6 @@ var currentLang = document.cookie.replace(
"$1"
);
-console.log("currentLang: " + currentLang);
-
if (currentLang == "ja") {
triggerTranslation("ja");
} else {
@@ -27,14 +25,17 @@ function triggerTranslation(language) {
if (!selectEl) {
setTimeout(function () {
triggerTranslation(language);
- }, 100);
+ }, 10);
} else if (!selectEl.options || selectEl.options.length === 0) {
setTimeout(function () {
triggerTranslation(language);
- }, 100);
+ }, 10);
} else {
- // Continue with the logic for handling the available options
- selectEl.value = language; // Change the value of the select element
- selectEl.dispatchEvent(new Event("change")); // Trigger change event
+ selectEl.value = language;
+ selectEl.dispatchEvent(new Event("change"));
+ // visiblity of #main-section is hidden until translation is done, show it after translation is done
+ setTimeout(function () {
+ document.getElementById("main-section").style.visibility = "visible";
+ }, 200);
}
}