2022-05-30 23:26:22 +02:00
|
|
|
var coll = document.getElementsByClassName("collapsible");
|
|
|
|
var i;
|
|
|
|
|
|
|
|
for (i = 0; i < coll.length; i++) {
|
2022-06-19 10:11:28 +02:00
|
|
|
coll[i].addEventListener("click", function () {
|
2022-05-30 23:26:22 +02:00
|
|
|
this.classList.toggle("active");
|
|
|
|
var content = this.nextElementSibling;
|
2022-06-19 10:11:28 +02:00
|
|
|
if (content.style.maxHeight) {
|
2022-05-30 23:26:22 +02:00
|
|
|
content.style.maxHeight = null;
|
|
|
|
} else {
|
|
|
|
content.style.maxHeight = content.scrollHeight + "px";
|
|
|
|
}
|
|
|
|
});
|
2022-06-19 10:11:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function logout() {
|
|
|
|
localStorage.clear();
|
|
|
|
location.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
function logoutVisibility() {
|
|
|
|
if (localStorage.getItem("token") !== null) {
|
|
|
|
document.getElementById("logout").style.display = "";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
document.getElementById("logout").style.display = "none";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function loginVisibility() {
|
|
|
|
if (localStorage.getItem("token") !== null) {
|
|
|
|
document.getElementById("login").style.display = "none";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
document.getElementById("login").style.display = "";
|
|
|
|
|
|
|
|
}
|
2022-05-30 23:26:22 +02:00
|
|
|
}
|