let switchPanel = document.querySelector(".admin > .switch"); if (switchPanel) { switchPanel.onclick = function () { if (this.parentElement) { this.parentElement.classList.toggle("open"); } }; }