From fc3e6f854f41029e9f67d30568737de22421af2b Mon Sep 17 00:00:00 2001 From: CNBorn Date: Wed, 10 Apr 2024 21:41:57 -0400 Subject: [PATCH] Fix disable-timeline on desktop --- script.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/script.js b/script.js index 4a4fbb2..135dd84 100644 --- a/script.js +++ b/script.js @@ -2691,10 +2691,7 @@ async function addToggleListRetweetsMenuItem($switchMenuItem) { function checkforDisabledHomeTimeline() { if (config.disableHomeTimeline && location.pathname == '/home') { log(`home timeline disabled, redirecting to /${config.disabledHomeTimelineRedirect}`) - let primaryNavSelector = desktop ? Selectors.PRIMARY_NAV_DESKTOP : Selectors.PRIMARY_NAV_MOBILE - ;/** @type {HTMLElement} */ ( - document.querySelector(`${primaryNavSelector} a[href="/${config.disabledHomeTimelineRedirect}"]`) - ).click() + setTimeout(() => location.href = `/${config.disabledHomeTimelineRedirect}`, 100) return true } }