summaryrefslogtreecommitdiff
path: root/scripts/global.js
diff options
context:
space:
mode:
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
+ }
+}