diff options
author | altaf-creator <dev@altafcreator.com> | 2024-04-25 13:16:25 +0700 |
---|---|---|
committer | altaf-creator <dev@altafcreator.com> | 2024-04-25 13:16:25 +0700 |
commit | 4842836da8cfa0e138682668fb2edcfe64fb38f8 (patch) | |
tree | ed15702b06ea572d33403daa5c1e7887801bd339 /scripts/globalElements.js | |
parent | a6788672b3f3cb81c8ffb3c5a18d662de9d7e0c3 (diff) |
sidebar localStorage
Diffstat (limited to 'scripts/globalElements.js')
-rw-r--r-- | scripts/globalElements.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/globalElements.js b/scripts/globalElements.js index 01d8516..381f564 100644 --- a/scripts/globalElements.js +++ b/scripts/globalElements.js @@ -1,5 +1,6 @@ // DEPENDENCIES: // * /scripts/global.js +// * /scripts/sidebar.js function updateGlobalElements() { if (isLangIndonesia()) { document.getElementById("lang-switcher-text").innerHTML = "Baca dalam Bahasa Inggris"; @@ -10,4 +11,10 @@ function updateGlobalElements() { } else { document.getElementById("lang-switcher-text").innerHTML = "Read in Indonesia"; } + + if (isSidebarOpen() && document.body.clientWidth >= 1000) { + openSidebar(false); + } else { + closeSidebar(false); + } } |