This commit is contained in:
syuilo
2018-03-16 05:45:28 +09:00
parent a94c0460ee
commit cada902e7a
4 changed files with 20 additions and 13 deletions

View File

@ -36,6 +36,7 @@
let lang = navigator.language.split('-')[0];
if (!/^(en|ja)$/.test(lang)) lang = 'en';
if (localStorage.getItem('lang')) lang = localStorage.getItem('lang');
if (ENV != 'production') lang = 'ja';
// Detect the user agent
const ua = navigator.userAgent.toLowerCase();
@ -69,7 +70,8 @@
const isDebug = localStorage.getItem('debug') == 'true';
// Whether use raw version script
const raw = localStorage.getItem('useRawScript') == 'true' && isDebug;
const raw = (localStorage.getItem('useRawScript') == 'true' && isDebug)
|| ENV != 'production';
// Load an app script
// Note: 'async' make it possible to load the script asyncly.