mirror of
https://git.steelants.cz/JonatanRek/VUE_GabenParadise.git
synced 2026-10-11 11:25:32 +00:00
Restruct
This commit is contained in:
1 parent
1ba0d7f9ba
commit
8d7722be91
3362 files changed
+13786
-500745
No files matched your search
@@ -0,0 +1,25 @@
|
||||
self.__precacheManifest = [].concat(self.__precacheManifest || []);
|
||||
|
||||
// workbox.setConfig({
|
||||
// debug: true
|
||||
// });
|
||||
|
||||
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
|
||||
|
||||
console.log('Loading SW');
|
||||
self.addEventListener("push", function (event) {
|
||||
console.log('Received a push message', event);
|
||||
if (event.data) {
|
||||
var data = event.data.json();
|
||||
console.log(data);
|
||||
event.waitUntil(self.registration.showNotification(data.notification.title, {
|
||||
body: data.notification.body,
|
||||
icon: data.notification.image || null
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
self.addEventListener("notificationclick", function (event) {
|
||||
const promiseChain = clients.openWindow("https://gabenparadise.com/");
|
||||
event.waitUntil(promiseChain);
|
||||
});
|
||||
Reference in new issue
Block a user