1importScripts('https://www.gstatic.com/firebasejs/7.9.1/firebase-app.js'); 2importScripts('https://www.gstatic.com/firebasejs/7.9.1/firebase-messaging.js'); 3 4if (!firebase.apps.length) { 5 firebase.initializeApp({ 6 apiKey: "AIzaSyARbcyn24ET3Bcwp8KLAcQmk4SxWF4m9MY", 7 authDomain: "phleboindia-staging-4d831.firebaseapp.com", 8 projectId: "phleboindia-staging-4d831", 9 storageBucket: "phleboindia-staging-4d831.appspot.com", 10 messagingSenderId: "346724381917", 11 appId: "1:346724381917:web:3f256182af9720dfe71734", 12 measurementId: "G-LD3XXV0H4K" 13 }); 14 firebase.messaging(); 15 //background notifications will be received here 16 firebase.messaging().setBackgroundMessageHandler((payload) => { 17 }) 18} 19 20self.addEventListener('push', async (e) => { 21 let bodyData = await e.data.json(); 22 23 // let parseData = JSON.parse(bodyData.notification) 24 25 const options = { 26 body: bodyData.notification.body, 27 icon: '/icon.png', // Customize with your own icon 28 }; 29 30 // USE When Need To open in Toaster 31 // self.clients.matchAll().then(function (clients) { 32 // clients.forEach(function (client) { 33 // client.postMessage({ 34 // type: 'showNotification', 35 // bodyData, 36 // }); 37 // }); 38 // }); 39 40 // Use this to Show Browser Notification 41 // e.waitUntil( 42 // self.registration.showNotification(bodyData.notification.title, options) 43 // ); 44});
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.