summaryrefslogtreecommitdiff
path: root/scripts/global.js
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2024-04-17 16:19:15 +0700
committeraltaf-creator <dev@altafcreator.com>2024-04-17 16:19:15 +0700
commitcd34dc6fb1cd47e578f761a7609bd976f253eac7 (patch)
tree3e488307733455c1a97b347a745d06f38ecf24e6 /scripts/global.js
parent3d0ccfba34d6371b41e877189b78599ae7b2f98a (diff)
idk what i did, i forgot. go check the diffs
Diffstat (limited to 'scripts/global.js')
-rw-r--r--scripts/global.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/global.js b/scripts/global.js
new file mode 100644
index 0000000..df82ef6
--- /dev/null
+++ b/scripts/global.js
@@ -0,0 +1,21 @@
+// RETURN VALUE
+// TYPE : bool
+// DESCRIPTION : true = indonesia; false = english (fallback);
+function isLangIndonesia() {
+ if (localStorage.getItem("lang") == "id") {
+ return true
+ } else {
+ return false
+ }
+}
+
+// RETURN VALUE
+// TYPE : bool
+// DESCRIPTION : true = dark; false = light (fallback);
+function isDarkMode() {
+ if (localStorage.getItem("theme") == "dark") {
+ return true
+ } else {
+ return false
+ }
+}