From d7116b08a63f52177239bfd28df5da8baa78fa7b Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 18 Jan 2026 20:10:33 -0500 Subject: [PATCH] Add for-you link resolution in app chrome --- js/app.js | 26 ++++++++++++++++++++++++++ js/ui/applicationBootstrap.js | 1 + 2 files changed, 27 insertions(+) diff --git a/js/app.js b/js/app.js index 1415a0ce..360773f5 100644 --- a/js/app.js +++ b/js/app.js @@ -3928,6 +3928,11 @@ class Application { if (subscriptionsLink) { subscriptionsLink.classList.remove("hidden"); } + + const forYouLink = this.resolveForYouLink(); + if (forYouLink) { + forYouLink.classList.remove("hidden"); + } } applyLoggedOutUiState() { @@ -3962,6 +3967,11 @@ class Application { if (subscriptionsLink) { subscriptionsLink.classList.add("hidden"); } + + const forYouLink = this.resolveForYouLink(); + if (forYouLink) { + forYouLink.classList.add("hidden"); + } } syncAuthUiState() { @@ -4018,9 +4028,25 @@ class Application { return null; } + resolveForYouLink() { + if (this.forYouLink instanceof HTMLElement && this.forYouLink.isConnected) { + return this.forYouLink; + } + + const linkCandidate = document.getElementById("forYouLink"); + if (linkCandidate instanceof HTMLElement) { + this.forYouLink = linkCandidate; + return this.forYouLink; + } + + this.forYouLink = null; + return null; + } + hydrateSidebarNavigation() { const chromeElements = this.refreshChromeElements(); this.resolveSubscriptionsLink(); + this.resolveForYouLink(); if (this.appChromeController) { if (typeof this.appChromeController.setElements === "function") { diff --git a/js/ui/applicationBootstrap.js b/js/ui/applicationBootstrap.js index 35000c7b..7290193e 100644 --- a/js/ui/applicationBootstrap.js +++ b/js/ui/applicationBootstrap.js @@ -628,6 +628,7 @@ export default class ApplicationBootstrap { app.tagPreferencePopovers = new Map(); app.subscriptionsLink = null; + app.forYouLink = null; app.notificationPortal = doc?.getElementById("notificationPortal") || null; app.errorContainer = doc?.getElementById("errorContainer") || null;