Lint all the things
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
// Scripts for firebase and firebase messaging
|
||||
// eslint-disable-next-line no-undef
|
||||
importScripts("https://www.gstatic.com/firebasejs/10.14.1/firebase-app-compat.js");
|
||||
// eslint-disable-next-line no-undef
|
||||
importScripts("https://www.gstatic.com/firebasejs/10.14.1/firebase-messaging-compat.js");
|
||||
|
||||
// Initialize the Firebase app in the service worker by passing the generated config
|
||||
@@ -42,13 +44,16 @@ switch (this.location.hostname) {
|
||||
};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
firebase.initializeApp(firebaseConfig);
|
||||
|
||||
// Retrieve firebase messaging
|
||||
// eslint-disable-next-line no-undef
|
||||
const messaging = firebase.messaging();
|
||||
|
||||
messaging.onBackgroundMessage(function (payload) {
|
||||
// Customize notification here
|
||||
console.log("[firebase-messaging-sw.js] Received background message ", payload);
|
||||
// eslint-disable-next-line no-undef
|
||||
self.registration.showNotification(notificationTitle, notificationOptions);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user