1self.addEventListener('notificationclick', function (e) { 2 e.notification.close(); 3 let clickResponsePromise = Promise.resolve(); 4 if (e.notification.data && e.notification.data.click_action) { 5 clickResponsePromise = clients.openWindow(e.notification.data.click_action); 6 } 7 8 e.waitUntil( 9 Promise.all([ 10 clickResponsePromise, 11 ]) 12 ); 13}); 14 15importScripts('https://www.gstatic.com/firebasejs/8.6.8/firebase-app.js'); 16importScripts('https://www.gstatic.com/firebasejs/8.6.8/firebase-messaging.js'); 17 18firebase.initializeApp({ 19 apiKey: 'AIzaSyAhwiBZxXRx0kDnj4NcEuQ9BXGVcFtG_K4', 20 authDomain: 'nifty-oxide-155207.firebaseapp.com', 21 databaseURL: 'https://nifty-oxide-155207.firebaseio.com', 22 projectId: 'nifty-oxide-155207', 23 storageBucket: 'nifty-oxide-155207.appspot.com', 24 messagingSenderId: '988594641313', 25 appId: "1:988594641313:web:3d967d5e5fafa68a3113e0" 26}); 27 28const messaging = firebase.messaging(); 29 30messaging.setBackgroundMessageHandler(function (payload) { 31 console.log('[firebase-messaging-sw.js] Received background message ', payload); 32 return self.registration.showNotification(payload.data.title, 33 Object.assign({data: payload.data}, payload.data)); 34 35});
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.