summaryrefslogtreecommitdiff
path: root/src/web/app/common/mios.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-21 05:09:45 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-21 05:09:45 +0900
commitc598a9cba2d4cdecf2aec3dcde1a893ee039bce3 (patch)
treeecd8d77ef22f487296b7ae0b3aba44d79eaf1506 /src/web/app/common/mios.ts
parentMerge remote-tracking branch 'refs/remotes/origin/master' into sw (diff)
downloadsharkey-c598a9cba2d4cdecf2aec3dcde1a893ee039bce3.tar.gz
sharkey-c598a9cba2d4cdecf2aec3dcde1a893ee039bce3.tar.bz2
sharkey-c598a9cba2d4cdecf2aec3dcde1a893ee039bce3.zip
wip
Diffstat (limited to 'src/web/app/common/mios.ts')
-rw-r--r--src/web/app/common/mios.ts5
1 files changed, 4 insertions, 1 deletions
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 => {