diff options
Diffstat (limited to 'scripts/globalElements.js')
-rw-r--r-- | scripts/globalElements.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/globalElements.js b/scripts/globalElements.js index 381f564..05b2f71 100644 --- a/scripts/globalElements.js +++ b/scripts/globalElements.js @@ -3,13 +3,21 @@ // * /scripts/sidebar.js function updateGlobalElements() { if (isLangIndonesia()) { - document.getElementById("lang-switcher-text").innerHTML = "Baca dalam Bahasa Inggris"; + try { + document.getElementById("lang-switcher-text").innerHTML = "Read in Indonesia"; + } catch { + console.log("lang switcher button not found, moving on...") + } document.getElementById("link-author").innerHTML = "Tentang Penulis"; document.getElementById("link-school").innerHTML = "Tentang Sekolah"; document.getElementById("link-lessons").innerHTML = "Mata Pelajaran"; document.getElementById("toc-title").innerHTML = "Daftar Isi" } else { - document.getElementById("lang-switcher-text").innerHTML = "Read in Indonesia"; + try { + document.getElementById("lang-switcher-text").innerHTML = "Read in Indonesia"; + } catch { + console.log("lang switcher button not found, moving on...") + } } if (isSidebarOpen() && document.body.clientWidth >= 1000) { |