From 217f1be72d79aa55df80034dd6d848dbbb07202c Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Sat, 12 Sep 2026 07:28:24 +0200 Subject: [PATCH] fdsa --- public/s/css/f0ckm.css | 32 +++++++++++++++++------ public/s/js/f0ckm.js | 1 + public/s/js/sidebar-activity.js | 46 +++++++++++++++++++++++++++++---- src/inc/locales/en.json | 2 +- src/inc/routeinc/f0cklib.mjs | 26 ++++++++++++++----- src/inc/routes/apiv2/index.mjs | 5 +++- views/snippets/footer.html | 3 ++- 7 files changed, 93 insertions(+), 22 deletions(-) diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css index 7a607cc..c4c91a2 100644 --- a/public/s/css/f0ckm.css +++ b/public/s/css/f0ckm.css @@ -3023,7 +3023,6 @@ body.sidebar-right-hidden #sidebar-drag-zone { /* Recommendation Video Cards (YouTube-style) */ .sidebar-video-card { margin-bottom: 5px; - border-radius: 8px; padding: 2px 2px 2px 2px; overflow: hidden; background: rgba(255, 255, 255, 0.02); @@ -3053,7 +3052,6 @@ body.sidebar-right-hidden #sidebar-drag-zone { position: relative; width: 100%; aspect-ratio: 16 / 9; - border-radius: 6px; overflow: hidden; background: #000; } @@ -3073,6 +3071,22 @@ body.sidebar-right-hidden #sidebar-drag-zone { transform: scale(1.04); } +.sidebar-video-badges { + position: absolute; + bottom: 6px; + right: 6px; + display: flex; + align-items: center; + gap: 4px; + z-index: 10; + pointer-events: none; +} + +.sidebar-video-badges .sidebar-media-format-badge, +.sidebar-video-badges .sidebar-video-badge { + position: static; +} + .sidebar-video-badge { position: absolute; bottom: 6px; @@ -3114,7 +3128,7 @@ body.sidebar-right-hidden #sidebar-drag-zone { position: absolute; top: 6px; left: 6px; - font-size: 0.6em; + font-size: 0.65em; font-weight: 700; padding: 2px 5px; border-radius: 3px; @@ -3124,6 +3138,8 @@ body.sidebar-right-hidden #sidebar-drag-zone { backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, 0.15); line-height: 1; + text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); z-index: 10; } @@ -3133,14 +3149,15 @@ body.sidebar-right-hidden #sidebar-drag-zone { display: flex; align-items: center; justify-content: center; - background: linear-gradient(135deg, #1e1b4b, #312e81); + background: linear-gradient(135deg, rgba(var(--accent-rgb, 153, 255, 0), 0.12), rgba(0, 0, 0, 0.45)), var(--nav-bg, #1e1e1e); color: var(--accent); font-size: 2em; } .sidebar-media-placeholder.audio { - background: linear-gradient(135deg, #0f172a, #1e293b); - color: #38bdf8; + background: radial-gradient(circle at center, rgba(var(--accent-rgb, 153, 255, 0), 0.22) 0%, rgba(var(--accent-rgb, 153, 255, 0), 0.05) 70%), var(--nav-bg, #1e1e1e); + color: var(--accent); + text-shadow: 0 0 16px rgba(var(--accent-rgb, 153, 255, 0), 0.35); } .sidebar-media-placeholder.hidden { @@ -3332,7 +3349,7 @@ html[theme='95'] .sidebar-video-title { align-items: center; justify-content: space-between; padding: 8px 12px; - background: rgba(18, 18, 24, 0.95); + background: var(--nav-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08)); margin-bottom: 6px; @@ -11496,7 +11513,6 @@ video.sidebar-comment-img.emoji { font-size: 0.8em; color: var(--accent); text-decoration: none; - margin: 4px 0; } .sidebar-video-link .yt-title { diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js index fa9e388..7bbaeda 100644 --- a/public/s/js/f0ckm.js +++ b/public/s/js/f0ckm.js @@ -6486,6 +6486,7 @@ window.cancelAnimFrame = (function () { if (window.f0ckSession) window.f0ckSession.strict_mode = strict.checked; window.updateStrictLinks(strict.checked); + document.dispatchEvent(new CustomEvent('f0ck:strictChanged', { detail: { strict: strict.checked } })); // Sync with server fetch('/strict/' + (strict.checked ? 1 : 0)); diff --git a/public/s/js/sidebar-activity.js b/public/s/js/sidebar-activity.js index 4a0a337..6cd13b6 100644 --- a/public/s/js/sidebar-activity.js +++ b/public/s/js/sidebar-activity.js @@ -1044,6 +1044,12 @@ let lastBoundMime = getCurrentMimeFilter(); + const isStrictMode = () => { + return !!(window.f0ckSession?.strict_mode || (localStorage.getItem('search_strict') === 'true') || window.location.search.includes('strict=1')); + }; + + let lastBoundStrict = isStrictMode(); + // Handle AJAX item loads document.addEventListener('f0ck:contentLoaded', () => { const currentMode = typeof window.activeMode !== 'undefined' ? window.activeMode : null; @@ -1054,9 +1060,13 @@ const mimeChanged = lastBoundMime !== null && lastBoundMime !== currentMime; lastBoundMime = currentMime; - window.f0ckDebug("Sidebar Activity: Page transition detected", modeChanged ? "(Mode changed)" : "", mimeChanged ? "(Mime changed)" : ""); + const currentStrict = isStrictMode(); + const strictChanged = lastBoundStrict !== null && lastBoundStrict !== currentStrict; + lastBoundStrict = currentStrict; - if (modeChanged || mimeChanged) { + window.f0ckDebug("Sidebar Activity: Page transition detected", modeChanged ? "(Mode changed)" : "", mimeChanged ? "(Mime changed)" : "", strictChanged ? "(Strict changed)" : ""); + + if (modeChanged || mimeChanged || strictChanged) { if (modeChanged) { window._sidebarActivityCache = []; lastRenderedIds = ''; @@ -1214,8 +1224,10 @@ const isTagFeed = options.isTagFeed || false; const tagContext = options.tag || null; + const isStrict = isStrictMode(); + const strictSuffix = (isTagFeed && isStrict) ? '?strict=1' : ''; const targetHref = (isTagFeed && tagContext) - ? `/tag/${encodeURIComponent(tagContext).replace(/%2C/g, ',').replace(/%20/g, ' ')}/${videoKey}` + ? `/tag/${encodeURIComponent(tagContext).replace(/%2C/g, ',').replace(/%20/g, ' ')}/${videoKey}${strictSuffix}` : `/${videoKey}`; const activeClass = options.isActive ? ' active-tag-item' : ''; @@ -1224,8 +1236,10 @@