diff --git a/config_example.json b/config_example.json index 1baed0c..e205e48 100644 --- a/config_example.json +++ b/config_example.json @@ -58,6 +58,7 @@ "custom_brand_image": [], "custom_navbar_brand_text": "", "show_koepfe": false, + "hide_sidebar_default": true, "koepfe": [], "enable_global_chat": true, "enable_danmaku": true, diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js index 1c35384..8b56fbd 100644 --- a/public/s/js/f0ckm.js +++ b/public/s/js/f0ckm.js @@ -2301,7 +2301,7 @@ window.cancelAnimFrame = (function () { let hiddenValue = localStorage.getItem('sidebarRightHidden'); let hidden; if (hiddenValue === null) { - hidden = false; // Default to visible on all devices + hidden = (window.f0ckSession && window.f0ckSession.hide_sidebar_default) ? true : false; // Default based on config localStorage.setItem('sidebarRightHidden', hidden); } else { hidden = hiddenValue === 'true'; diff --git a/src/index.mjs b/src/index.mjs index 90130f1..4777840 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -1267,6 +1267,7 @@ process.on('uncaughtException', err => { ts: Date.now(), get default_layout() { return getDefaultLayout(); }, show_koepfe: !!cfg.websrv.show_koepfe, + hide_sidebar_default: !!cfg.websrv.hide_sidebar_default, allow_language_change: cfg.websrv.allow_language_change !== false, enable_xd_score: !!cfg.websrv.enable_xd_score, enable_dynamic_thumbs: !!cfg.websrv.enable_dynamic_thumbs, diff --git a/views/snippets/footer.html b/views/snippets/footer.html index 8382b25..bbf192b 100644 --- a/views/snippets/footer.html +++ b/views/snippets/footer.html @@ -127,7 +127,7 @@ @endif @if(private_society && !session)