This commit is contained in:
Booteille 2024-10-31 16:28:59 +01:00
parent 460d689c4c
commit eee5f439b9
No known key found for this signature in database
GPG Key ID: 0AB6C6CA01272646
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
function notify(title, body) { const notify = (title, body) => {
if (!"Notification" in window || typeof Notification === "undefined") { if (!"Notification" in window || typeof Notification === "undefined") {
console.log( console.log(
`This browser does not support desktop notification, cannot send following message: ${title} ${body}` `This browser does not support desktop notification, cannot send following message: ${title} ${body}`
@ -15,7 +15,7 @@ function notify(title, body) {
}; };
new Notification(title, options); new Notification(title, options);
} }
} };
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
if (!"Notification" in window || typeof Notification === "undefined") { if (!"Notification" in window || typeof Notification === "undefined") {