summaryrefslogtreecommitdiff
path: root/src/web/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-16 06:09:23 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-16 06:09:23 +0900
commit8b0aabb4cb23e028ac721ec6e6e32d40bfb53752 (patch)
tree47abb83a87f2619d81ddd39e69e79adaf5f14c42 /src/web/app
parent:v: (diff)
downloadsharkey-8b0aabb4cb23e028ac721ec6e6e32d40bfb53752.tar.gz
sharkey-8b0aabb4cb23e028ac721ec6e6e32d40bfb53752.tar.bz2
sharkey-8b0aabb4cb23e028ac721ec6e6e32d40bfb53752.zip
oops
Diffstat (limited to 'src/web/app')
-rw-r--r--src/web/app/common/mios.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/web/app/common/mios.ts b/src/web/app/common/mios.ts
index 1669504af4..986630da20 100644
--- a/src/web/app/common/mios.ts
+++ b/src/web/app/common/mios.ts
@@ -405,8 +405,12 @@ export default class MiOS extends EventEmitter {
});
});
+ // Whether use raw version script
+ const raw = (localStorage.getItem('useRawScript') == 'true' && this.debug)
+ || process.env.NODE_ENV != 'production';
+
// The path of service worker script
- const sw = `/sw.${version}.${lang}.js`;
+ const sw = `/sw.${version}.${lang}.${raw ? 'raw' : 'min'}.js`;
// Register service worker
navigator.serviceWorker.register(sw).then(registration => {