summaryrefslogtreecommitdiff
path: root/src/web/app/boot.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/app/boot.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/web/app/boot.js b/src/web/app/boot.js
index 2d2e27df30..41685aadca 100644
--- a/src/web/app/boot.js
+++ b/src/web/app/boot.js
@@ -62,13 +62,17 @@
app = isMobile ? 'mobile' : 'desktop';
}
+ // Script version
const ver = localStorage.getItem('v') || VERSION;
+ // Whether use raw version script
+ const raw = localStorage.getItem('useRawScript') == 'true';
+
// Load an app script
// Note: 'async' make it possible to load the script asyncly.
// 'defer' make it possible to run the script when the dom loaded.
const script = document.createElement('script');
- script.setAttribute('src', `/assets/${app}.${ver}.${lang}.js`);
+ script.setAttribute('src', `/assets/${app}.${ver}.${lang}.${raw ? 'raw' : 'min'}.js`);
script.setAttribute('async', 'true');
script.setAttribute('defer', 'true');
head.appendChild(script);