diff --git a/index.html b/index.html index 7323652..76d2ea7 100644 --- a/index.html +++ b/index.html @@ -474,7 +474,7 @@
- 設定すると Synology 経由でずんだもん音声が使えます(未設定時はブラウザ音声)。 + 設定すると VPS 経由でずんだもん音声が使えます(未設定時はブラウザ音声)。
diff --git a/sw.js b/sw.js index 49f16a9..da3a780 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'posimai-brief-v4'; +const CACHE = 'posimai-brief-v5'; const ASSETS = ['/', '/index.html', '/manifest.json']; const ORIGIN = self.location.origin; @@ -11,9 +11,9 @@ self.addEventListener('activate', e => { e.waitUntil( caches.keys().then(keys => Promise.all(keys.filter(k => k !== CACHE).map(k => caches.delete(k))) - ).catch(err => console.warn('[SW] activate error', err)) + ).then(() => self.clients.claim()) + .catch(err => console.warn('[SW] activate error', err)) ); - self.clients.claim(); }); self.addEventListener('fetch', e => {