Ask for permission on load

This commit is contained in:
2023-11-07 22:15:52 +01:00
parent 33d8948a1b
commit 889cfd61f0

View File

@@ -11,6 +11,13 @@ if (Notification.permission !== "granted") {
Notification.requestPermission();
}
//Ask for notifications permission on page load
window.addEventListener('load', function() {
if (Notification.permission !== "granted") {
Notification.requestPermission();
}
});
const equipeList = await pb.collection('equipes').getFullList({});
const sportList = await pb.collection('sport').getFullList({});