var menuButton=document.getElementById("menu-button"),menuCloseButton=document.getElementById("menu-close-button"),menuWrapper=document.getElementById("menu-wrapper"),menuOpen=!1,openMenu=function(){menuOpen||(menuOpen=!0,document.body.style.overflowY="hidden",menuButton.style.visibility="hidden",menuWrapper.style.visibility="visible",menuWrapper.style.opacity="1",window.onbeforeunload=function(){closeMenu()})},closeMenu=function(e){menuOpen&&(menuOpen=!1,document.body.style.overflowY="auto",menuButton.style.visibility="visible",menuWrapper.style.visibility="hidden",menuWrapper.style.opacity="0",window.onbeforeunload=function(){},e.stopPropagation())};menuButton.addEventListener("click",openMenu),menuCloseButton.addEventListener("click",closeMenu)