window.addEventListener("scroll", function() { const header = document.getElementById("masthead"), scroll = window.pageYOffset | document.body.scrollTop; if (scroll > 80) { header.classList.add("mini"); } else if (scroll <= 80) { header.classList.remove("mini"); } });