mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-24 13:36:28 +00:00
feat: add browser push notifications
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
self.addEventListener('push', function(event) {
|
||||
const data = event.data ? event.data.text() : 'New notification';
|
||||
event.waitUntil(
|
||||
self.registration.showNotification('OpenIsle', {
|
||||
body: data,
|
||||
icon: '/favicon.ico'
|
||||
})
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user