From 294cf2455adc49761daacd68df63e03270a97526 Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Sat, 18 Jul 2026 16:48:55 +0200 Subject: [PATCH] hide sidebar yes no --- config_example.json | 1 + public/s/js/f0ckm.js | 2 +- src/index.mjs | 1 + views/snippets/footer.html | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) 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)