1self.addEventListener('notificationclick', (event) => { 2 event.notification.close(); 3 event.stopImmediatePropagation(); 4 const data = event.notification.data || {}; 5 const targetUrl = data.target_url || (data.FCM_MSG && data.FCM_MSG.data && data.FCM_MSG.data.target_url); 6 if (targetUrl) { 7 event.waitUntil(clients.openWindow(new URL(targetUrl, self.location.origin).href)); 8 } 9}); 10importScripts('https://www.gstatic.com/firebasejs/12.17.1/firebase-app-compat.js'); 11importScripts('https://www.gstatic.com/firebasejs/12.17.1/firebase-messaging-compat.js'); 12firebase.initializeApp({"apiKey":"AIzaSyBId6JbO0jjmd2CENH2mXTSnzB8zk4GDxI","authDomain":"trualta-notifications.firebaseapp.com","projectId":"trualta-notifications","messagingSenderId":"955236814163","appId":"1:955236814163:web:5006d7e0b55742b188e5a6"}); 13const messaging = firebase.messaging(); 14const notificationIcon = "https:\/\/assets.trualta.com\/apple-touch-icon.png"; 15messaging.onBackgroundMessage((payload) => { 16 const data = payload.data || {}; 17 const title = data.title || 'Trualta'; 18 const body = data.body || ''; 19 const icon = data.icon || notificationIcon; 20 return self.registration.showNotification(title, { 21 body, 22 icon, 23 badge: icon, 24 tag: data.notification_id || 'trualta', 25 data, 26 }); 27}); 28self.addEventListener('install', () => self.skipWaiting()); 29self.addEventListener('activate', (event) => event.waitUntil(self.clients.claim()));
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.