1// Firebase Messaging Service Worker 2 3self.addEventListener("push", (event) => { 4 5 const notif = event.data.json().notification; 6 const extra_info = event.data.json().data; 7 8 event.waitUntil(self.registration.showNotification(notif.title, { 9 body: notif.body, 10 icon: extra_info.icon, 11 image: notif.image, 12 data: { 13 url: extra_info.click_action, 14 notify_id: extra_info.notify_id 15 } 16 })); 17 18}); 19 20self.addEventListener("notificationclick", async (event) => { 21 22 var notify_id = event.notification.data.notify_id; 23 event.waitUntil(clients.openWindow(event.notification.data.url)); 24 event.notification.close(); 25 try { 26 var save_click_event = await fetch("https://push.mtnews24.com/public/api/new-notification-clicked?notify_id=" + notify_id); 27 } catch (e) { 28 29 } 30 31});
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.