docs: clear service worker

This commit is contained in:
DIYgod 2023-08-15 16:24:17 +01:00
parent d3fbdfe404
commit adb90e1716
No known key found for this signature in database
2 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<p align="center">
<img src="https://docs.rsshub.app/logo.png" alt="RSSHub" width="100">
<img src="https://docs.rsshub.app/img/logo.png" alt="RSSHub" width="100">
</p>
<h1 align="center">RSSHub</h1>

View File

@ -0,0 +1,14 @@
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));
});
});