summaryrefslogtreecommitdiff
path: root/src/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app')
-rw-r--r--src/web/app/boot.js6
-rw-r--r--src/web/app/desktop/views/components/settings.vue11
2 files changed, 14 insertions, 3 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);
diff --git a/src/web/app/desktop/views/components/settings.vue b/src/web/app/desktop/views/components/settings.vue
index 39d9be01da..5627da1ccc 100644
--- a/src/web/app/desktop/views/components/settings.vue
+++ b/src/web/app/desktop/views/components/settings.vue
@@ -160,10 +160,13 @@
<section class="other" v-show="page == 'other'">
<h1>高度な設定</h1>
<mk-switch v-model="debug" text="デバッグモードを有効にする">
- <span>この設定はアカウントに保存されません。</span>
+ <span>この設定はブラウザに記憶されます。</span>
</mk-switch>
<mk-switch v-model="enableExperimental" text="実験的機能を有効にする">
- <span>この設定はアカウントに保存されません。実験的機能を有効にするとMisskeyの動作が不安定になる可能性があります。</span>
+ <span>実験的機能を有効にするとMisskeyの動作が不安定になる可能性があります。この設定はブラウザに記憶されます。</span>
+ </mk-switch>
+ <mk-switch v-model="useRawScript" text="生のスクリプトを読み込む">
+ <span>圧縮されていない「生の」スクリプトを使用します。サイズが大きいため、読み込みに時間がかかる場合があります。この設定はブラウザに記憶されます。</span>
</mk-switch>
</section>
@@ -214,6 +217,7 @@ export default Vue.extend({
lang: localStorage.getItem('lang') || '',
preventUpdate: localStorage.getItem('preventUpdate') == 'true',
debug: localStorage.getItem('debug') == 'true',
+ useRawScript: localStorage.getItem('useRawScript') == 'true',
enableExperimental: localStorage.getItem('enableExperimental') == 'true'
};
},
@@ -236,6 +240,9 @@ export default Vue.extend({
debug() {
localStorage.setItem('debug', this.debug ? 'true' : 'false');
},
+ useRawScript() {
+ localStorage.setItem('useRawScript', this.useRawScript ? 'true' : 'false');
+ },
enableExperimental() {
localStorage.setItem('enableExperimental', this.enableExperimental ? 'true' : 'false');
}