summaryrefslogtreecommitdiff
path: root/frontend/permissionrequest.js
blob: 1146ed65173f3d3e22354e705a09dcb37365f32f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()
}