summaryrefslogtreecommitdiff
path: root/scripts/globalElements.js
blob: 381f564b2f1e519507e5ae2271613be633399556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// DEPENDENCIES:
// * /scripts/global.js
// * /scripts/sidebar.js
function updateGlobalElements() {
	if (isLangIndonesia()) {
		document.getElementById("lang-switcher-text").innerHTML = "Baca dalam Bahasa Inggris";
		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";
	}

	if (isSidebarOpen() && document.body.clientWidth >= 1000) {
		openSidebar(false);
	} else {
		closeSidebar(false);
	}
}