push notifications

This commit is contained in:
cpu
2025-03-26 05:04:50 +01:00
parent a0f3489656
commit fc278ed256
4 changed files with 125 additions and 30 deletions

View File

@@ -164,6 +164,16 @@
.catch((err) => console.log("Service Worker Failed", err));
}
</script>
<script>
// Request notification permission on page load
document.addEventListener('DOMContentLoaded', () => {
if ('Notification' in window) {
Notification.requestPermission().then(permission => {
console.log('Notification permission:', permission);
});
}
});
</script>
<footer class="app-footer">
<div class="author-info">
<p>Vibe coded by Martin</p>