/
home
/
henzagold
/
branch
/
export
/
File Upload :
llllll
Current File: /home/henzagold/branch/export/firebase-messaging-sw.js
'use strict'; // eslint-disable-next-line no-undef importScripts('https://www.gstatic.com/firebasejs/8.2.4/firebase-app.js') // eslint-disable-next-line no-undef importScripts('https://www.gstatic.com/firebasejs/8.2.4/firebase-messaging.js') const firebaseConfig = { messagingSenderId: '464066939468', } firebase.initializeApp(firebaseConfig) // eslint-disable-next-line no-restricted-globals self.addEventListener('push', event => { const data = event.data.json() const { title } = data.notification const { body } = data.notification const options = { body, title, icon: 'https://henzagold.com/admin/logo.png', } // eslint-disable-next-line no-restricted-globals event.waitUntil(self.registration.showNotification(title, options)) }) // eslint-disable-next-line no-restricted-globals self.addEventListener('notificationclick', event => { console.log(event.notification, 'event.notification') }) // eslint-disable-next-line no-restricted-globals self.addEventListener('notificationclose', event => { console.log(event, 'eventeventeventeventeventeventeventeventevent') })
Copyright ©2k19 -
Hexid
|
Tex7ure