diff --git a/.gitbook/sw.js b/.gitbook/sw.js new file mode 100644 index 00000000..2eaf6d57 --- /dev/null +++ b/.gitbook/sw.js @@ -0,0 +1,13 @@ +self.addEventListener('install', function(e) { + self.skipWaiting(); +}); + +self.addEventListener('activate', function(e) { + self.registration.unregister() + .then(function() { + return self.clients.matchAll(); + }) + .then(function(clients) { + clients.forEach(client => client.navigate(client.url)) + }); +});