From 3856f752bd207f05cae8a00fe3960dfe8aae2a6e Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Sun, 12 Jul 2026 20:22:19 +0200 Subject: [PATCH] Revert "uga aga pipi kaka" This reverts commit ecdf54a894b5c4cab02b19b8caba8b105194cabf. --- public/s/js/f0ckm.js | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js index b0864f4..33228ea 100644 --- a/public/s/js/f0ckm.js +++ b/public/s/js/f0ckm.js @@ -2227,15 +2227,12 @@ window.cancelAnimFrame = (function () { } - // Check for cached grid (Index/Grid Only) - RESTORE EARLY to avoid pagination/layout destruction. - // We check the cache for ANY grid navigation (not just skipPush/popstate) so that clicking the - // logo or any other link back to a previously-viewed grid page is instant — no blank thumbs, - // no re-fetch. The cached DOM node already has all background-images set on the thumb elements. - if (isGrid) { + // Check for cached grid (Index/Grid Only) - RESTORE EARLY to avoid pagination/layout destruction + if (isGrid && options.skipPush) { const targetCacheKey = urlObj.pathname + urlObj.search; if (gridCacheMap.has(targetCacheKey)) { const cache = gridCacheMap.get(targetCacheKey); - gridCacheMap.delete(targetCacheKey); // Consume cache (one-shot restore) + gridCacheMap.delete(targetCacheKey); // Consume cache stopMedia(); @@ -2283,12 +2280,6 @@ window.cancelAnimFrame = (function () { if (restoredPosts._infiniteState) restoredPosts._infiniteState.loading = false; } } - - // Push URL to history for forward navigations (logo click etc.) so the back button works. - // skipPush navigations (popstate) must NOT push or we'd create a double history entry. - if (!options.skipPush) { - history.pushState({}, '', url); - } // Restore Scroll Position requestAnimationFrame(() => window.scrollTo(0, cache.scroll)); @@ -3715,18 +3706,6 @@ window.cancelAnimFrame = (function () { targetUrl = targetUrl.replace(/[?&]strict=1/, '').replace(/[?&]$/, ''); } - // If we're already on this exact page and there's no cached grid to restore, - // just scroll to top — no point wiping and re-fetching the current grid. - const _targetBase = targetUrl.split('#')[0]; - const _currentBase = window.location.href.split('#')[0]; - if (_targetBase === _currentBase && !anyLink.hash) { - const _cacheKey = new URL(targetUrl, window.location.origin).pathname + new URL(targetUrl, window.location.origin).search; - if (!gridCacheMap.has(_cacheKey)) { - window.scrollTo({ top: 0, behavior: 'smooth' }); - return false; - } - } - const parts = pathname.split('/').filter(Boolean); const isItemLink = !pathname.match(/\/p\//) && ( pathname.match(/^\/\d+/) ||