self.addEventListener('install', e=>self.skipWaiting());
self.addEventListener('fetch', e=>{});

self.addEventListener('notificationclick', function(event){ event.notification.close(); var url=(event.notification && event.notification.data && event.notification.data.url) || '/'; event.waitUntil(clients.matchAll({type:'window',includeUncontrolled:true}).then(function(list){ for(var i=0;i<list.length;i++){ if('focus' in list[i]) return list[i].focus(); } if(clients.openWindow) return clients.openWindow(url); })); });
