1if('function' === typeof importScripts) { 2 const firebaseVersion = '8.9.1'; 3 4 importScripts("https://www.gstatic.com/firebasejs/" + firebaseVersion + "/firebase-app.js"); 5 importScripts("https://www.gstatic.com/firebasejs/" + firebaseVersion + "/firebase-messaging.js"); 6 addEventListener('message', onMessage); 7 8 function onMessage(e) { 9 // do some work here 10 } 11 12 // Initialize the Firebase app in the service worker by passing in the 13 // messagingSenderId. 14 const firebaseConfig = { 15 apiKey: "AIzaSyCGYkdBp6Kju8EgyTj6AlU7sCc0CvnM9Uw", 16 authDomain: "bonita-de-webpush.firebaseapp.com", 17 projectId: "bonita-de-webpush", 18 storageBucket: "bonita-de-webpush.appspot.com", 19 messagingSenderId: "615918341054", 20 appId: "1:615918341054:web:e2dc82c78f5aea651d87ef", 21 measurementId: "G-WR63046W02" 22 }; 23 24 firebase.initializeApp(firebaseConfig); 25 26 // Retrieve an instance of Firebase Messaging so that it can handle background messages. 27 const messaging = firebase.messaging(); 28 29 messaging.onBackgroundMessage(function(payload) { 30 // do some work here 31 32 /* 33 if (!payload.notification && payload.webpush && payload.webpush.notification) { 34 const notificationTitle = payload.webpush.notification.title; 35 const notificationOptions = payload.webpush.notification; 36 37 if (notificationOptions.image && !notificationOptions.icon) { 38 notificationOptions.icon = notificationOptions.image; 39 } 40 41 return self.registration.showNotification( 42 notificationTitle, 43 notificationOptions 44 ); 45 } 46 */ 47 }); 48}
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.