PageSourceSearch

https://www.cipollettidigital.com.ar/firebase-messaging-sw.js?_v=v3-16

js cipollettidigital.com.ar collected 2026-10-02 08:29:20 UTC 1,676 bytes, 49 lines download raw bytes

1self.addEventListener('notificationclick', function(event) {
2  event.notification.close();
3  event.waitUntil(async function () {
4  
5    try {
6      const url =  new URL(event.notification.data.FCM_MSG.data.link).toString();
7      if (url) {
8        c = await clients.openWindow(url);    
9      }
10    } catch(e) {
11      try {
12        let data = JSON.parse(event.notification.data);
13        const url = new URL(data.link).toString();
14        if (url) {
15          c = await clients.openWindow(url);    
16        }
17      } catch(e) {
18        console.error('Error al manejar el evento de clic en la notificación:', e);
19      }
20    }
21
22   
23  }());
24});
25
26importScripts('https://www.gstatic.com/firebasejs/10.11.0/firebase-app-compat.js')
27importScripts('https://www.gstatic.com/firebasejs/10.11.0/firebase-messaging-compat.js')
28
29// Your web app's Firebase configuration
30// For Firebase JS SDK v7.20.0 and later, measurementId is optional
31const firebaseConfig =  {"apiKey":"AIzaSyCnjfIgRsAmtxZWMFXynf3tbySa-zjgt9U","authDomain":"cipolletti-digital-noticias.firebaseapp.com","projectId":"cipolletti-digital-noticias","storageBucket":"cipolletti-digital-noticias.firebasestorage.app","messagingSenderId":"477534849333","appId":"1:477534849333:web:b1952eba380cc51228647c"};
32
33// Initialize Firebase
34const app = firebase.initializeApp(firebaseConfig);
35const messaging = firebase.messaging();
36
37// Configuración opcional de mensajería de Firebase
38messaging.onBackgroundMessage(function(payload) {
39  
40  // Personaliza el manejo del mensaje recibido en segundo plano aquí
41
42  const notificationTitle = payload.data.title;
43  const notificationOptions = payload.data;
44
45});
46
47
48
49/* version: v3-16 */

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.