diff options
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); + } } |