remote button triggers next player
This commit is contained in:
22
sw.js
22
sw.js
@@ -151,18 +151,18 @@ self.addEventListener('message', event => {
|
||||
self.addEventListener('push', event => {
|
||||
console.log('[ServiceWorker] Push received');
|
||||
|
||||
const data = event.data ? event.data.json() : {};
|
||||
const title = data.title || 'Game Timer Notification';
|
||||
const options = {
|
||||
body: data.body || 'You have a new notification',
|
||||
icon: '/icons/android-chrome-192x192.png',
|
||||
badge: '/icons/android-chrome-192x192.png',
|
||||
data: data
|
||||
};
|
||||
// const data = event.data ? event.data.json() : {};
|
||||
// const title = data.title || 'Game Timer Notification';
|
||||
// const options = {
|
||||
// body: data.body || 'You have a new notification',
|
||||
// icon: '/icons/android-chrome-192x192.png',
|
||||
// badge: '/icons/android-chrome-192x192.png',
|
||||
// data: data
|
||||
// };
|
||||
|
||||
event.waitUntil(
|
||||
self.registration.showNotification(title, options)
|
||||
);
|
||||
// event.waitUntil(
|
||||
// self.registration.showNotification(title, options)
|
||||
// );
|
||||
});
|
||||
|
||||
// This helps with navigation after app is installed
|
||||
|
||||
Reference in New Issue
Block a user