1/** 2 * Service worker for web push notifications. 3 * Handles push events from the backend and notification click navigation. 4 */ 5 6self.addEventListener('push', (event) => { 7 const data = event.data?.json() ?? {}; 8 event.waitUntil( 9 self.registration.showNotification(data.title || 'Donna', { 10 body: data.body, 11 icon: '/donna-icon-192.png', 12 badge: '/donna-icon-192.png', 13 tag: data.tag, 14 data: { url: data.url }, 15 }) 16 ); 17}); 18 19self.addEventListener('notificationclick', (event) => { 20 event.notification.close(); 21 const url = event.notification.data?.url || '/'; 22 event.waitUntil(clients.openWindow(url)); 23});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.