window.addEventListener("load", () => { let menu = document.querySelector(".navbar-menu"); let nav = document.querySelector("nav"); // Toggle display of the menu for mobile; document.querySelector("#navbar-toggler").addEventListener("click", () => { menu.classList.toggle('shown'); nav.classList.toggle('menu-shown'); }) document.querySelectorAll(".menu-with-sub").forEach(menu => { menu.querySelector("a[role=button]").addEventListener("click", () => { menu.classList.toggle('toggled'); }) }) // Basic mail protection for(let emailLink of document.querySelectorAll("a[alt=Mail]")) { emailLink.href = "mail" + "to" + String.fromCharCode(58) + "mail" + String.fromCharCode(64) + "ad5001.eu" } })