1// importScripts('https://www.gstatic.com/firebasejs/9.6.7/firebase-app-compat.js'); 2// importScripts('https://www.gstatic.com/firebasejs/9.6.7/firebase-messaging-compat.js'); 3 4// self.addEventListener("notificationclick", (event) => { 5// const url = event.target.location.origin; 6// event.waitUntil( 7// clients.matchAll({ type: "window" }).then((windowClients) => { 8// for (let i = 0; i < windowClients.length; i++) { 9// let client = windowClients[i]; 10// // If so, just focus it. 11// if (client.url === url && "focus" in client) { 12// return client.focus(); 13// } 14// } 15// // If not, then open the target URL in a new window/tab. 16// if (clients.openWindow) { 17// return clients.openWindow(url); 18// } 19// }) 20// ); 21// }); 22 23// firebase.initializeApp({ 24// apiKey: "AIzaSyDqYWiIT7RvTYjuJG8HOcJxfazYd1sAZaU", 25// authDomain: "next-development.firebaseapp.com", 26// databaseURL: "https://next-development.firebaseio.com", 27// projectId: "next-development", 28// storageBucket: "next-development.appspot.com", 29// messagingSenderId: "433384143321", 30// appId: "1:433384143321:web:b5274c7d753a0f11f901c8", 31// measurementId: "G-EK0SHTS9WS" 32// }) 33 34// const messaging = firebase.messaging(); 35 36// messaging.onBackgroundMessage((payload) => { 37// const notificationTitle = payload.data.title; 38// const notificationOptions = { 39// body: payload.data.body, 40// icon: '/favicon.ico' 41// }; 42 43// self.registration.showNotification(notificationTitle, 44// notificationOptions); 45// }); 46 47 48//remove this service worker file from the existing users if firebase push notifications are not being used 49if ('serviceWorker' in navigator) { 50 navigator.serviceWorker.getRegistrations().then(function(registrations) { 51 for(let registration of registrations) { 52 if (registration.active?.scriptURL?.includes("firebase-messaging-sw.js")) { 53 registration.unregister(); 54 } 55 } 56}); 57}
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.