From c3d098eb0d065a0851d562229ce89a08423a630f Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Tue, 6 Oct 2026 22:22:25 -0400 Subject: [PATCH] Ensure active-page=home only set on the actual home page --- scripts/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/utils.js b/scripts/utils.js index 483ea51..efd51ef 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -2945,14 +2945,14 @@ window.KefinTweaksConfig = ${JSON.stringify(config, null, 2)};`; } let page = ''; - const homeTabMatch = hash.match(/[?&]tab=(\d+)/); - const homeTab = homeTabMatch ? homeTabMatch[1] : null; + const tabMatch = hash.match(/[?&]tab=(\d+)/); + const tabIndex = tabMatch ? tabMatch[1] : null; - if (hash.includes('/home') && homeTab === '1') { + if (hash.includes('/home') && tabIndex === '1') { page = 'favorites'; } else if (watchlistUrl && hash.includes(watchlistUrl)) { page = 'watchlist'; - } else if (hash.includes('#/home') || hash === '#/' || hash === '#' || hash === '') { + } else if (hash === '#/' || hash === '#' || hash === '' || (hash.includes('#/home') && (tabIndex === 0 || tabIndex === null))) { page = 'home'; } else if (hash.includes('#/tv')) { page = 'tv';