const notif = document.getElementById("notif-panel"); const notbtn = document.getElementById("notbtn"); (async function () { cookie = await cookieStore.get("subscription_endpoint"); if (cookie) { notif.style.display = "none"; } })(); notbtn.addEventListener("click", () => requestPermission()) async function requestPermission() { subscribe() }