From c598a9cba2d4cdecf2aec3dcde1a893ee039bce3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 21 Nov 2017 05:09:45 +0900 Subject: wip --- src/web/app/common/mios.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/web/app/common/mios.ts') diff --git a/src/web/app/common/mios.ts b/src/web/app/common/mios.ts index 4a36d6375f..a98ef5f477 100644 --- a/src/web/app/common/mios.ts +++ b/src/web/app/common/mios.ts @@ -6,6 +6,9 @@ import HomeStreamManager from './scripts/streaming/home-stream-manager'; import CONFIG from './scripts/config'; import api from './scripts/api'; +declare var VERSION: string; +declare var LANG: string; + /** * Misskey Operating System */ @@ -142,7 +145,7 @@ export default class MiOS extends EventEmitter { navigator.serviceWorker.ready.then(this.swSubscribe); // Register service worker - navigator.serviceWorker.register('/sw.js').then(registration => { + navigator.serviceWorker.register(`/sw.${VERSION}.${LANG}.js`).then(registration => { // 登録成功 console.info('ServiceWorker registration successful with scope: ', registration.scope); }).catch(err => { -- cgit v1.2.3-freya