1// public/service-worker.js 2self.addEventListener('push', function(event) { 3 const data = event.data.json(); 4 console.log('Push received:', data); 5 6 const title = data.title || 'New Appointment'; 7 const options = { 8 body: data.body || 'A new appointment has been booked.', 9 icon: '/new_ziyan_logo.png', // Path to your app icon 10 badge: '/new_ziyan_logo.png', // Path to a small badge icon 11 data: { 12 url: data.url || '/', // URL to open when notification is clicked 13 } 14 }; 15 16 event.waitUntil( 17 self.registration.showNotification(title, options) 18 ); 19}); 20 21self.addEventListener('notificationclick', function(event) { 22 event.notification.close(); 23 event.waitUntil( 24 clients.openWindow(event.notification.data.url) 25 ); 26});
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.