mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-16 05:04:02 -05:00
719ab720a7
* fix(push-notification): Open link in current tab if possible * feat(sw): Skip waiting and claim clients
11 lines
393 B
JavaScript
11 lines
393 B
JavaScript
import './web_push_notifications';
|
|
|
|
// Cause a new version of a registered Service Worker to replace an existing one
|
|
// that is already installed, and replace the currently active worker on open pages.
|
|
self.addEventListener('install', function(event) {
|
|
event.waitUntil(self.skipWaiting());
|
|
});
|
|
self.addEventListener('activate', function(event) {
|
|
event.waitUntil(self.clients.claim());
|
|
});
|