mirror of
https://github.com/appen-isen/site-interpromo-2023.git
synced 2026-01-18 16:47:22 +01:00
fix notification setup (not tested)
This commit is contained in:
@@ -14,7 +14,11 @@ else{
|
||||
//Ask for notifications permission on page load
|
||||
window.addEventListener('load', function() {
|
||||
if (Notification.permission !== "granted") {
|
||||
Notification.requestPermission();
|
||||
Notification.requestPermission().then(r => {
|
||||
if(r !== "granted"){
|
||||
console.error("Permission de notification refusée");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user