diff --git a/js/app.js b/js/app.js
index e553b8c0..c689207e 100644
--- a/js/app.js
+++ b/js/app.js
@@ -4061,6 +4061,11 @@ class Application {
if (forYouLink) {
forYouLink.classList.remove("hidden");
}
+
+ const exploreLink = this.resolveExploreLink();
+ if (exploreLink) {
+ exploreLink.classList.remove("hidden");
+ }
}
applyLoggedOutUiState() {
@@ -4100,6 +4105,11 @@ class Application {
if (forYouLink) {
forYouLink.classList.add("hidden");
}
+
+ const exploreLink = this.resolveExploreLink();
+ if (exploreLink) {
+ exploreLink.classList.add("hidden");
+ }
}
syncAuthUiState() {
@@ -4171,10 +4181,29 @@ class Application {
return null;
}
+ resolveExploreLink() {
+ if (
+ this.exploreLink instanceof HTMLElement &&
+ this.exploreLink.isConnected
+ ) {
+ return this.exploreLink;
+ }
+
+ const linkCandidate = document.getElementById("exploreLink");
+ if (linkCandidate instanceof HTMLElement) {
+ this.exploreLink = linkCandidate;
+ return this.exploreLink;
+ }
+
+ this.exploreLink = null;
+ return null;
+ }
+
hydrateSidebarNavigation() {
const chromeElements = this.refreshChromeElements();
this.resolveSubscriptionsLink();
this.resolveForYouLink();
+ this.resolveExploreLink();
if (this.appChromeController) {
if (typeof this.appChromeController.setElements === "function") {
diff --git a/js/ui/applicationBootstrap.js b/js/ui/applicationBootstrap.js
index 1a00c3b6..d7d69973 100644
--- a/js/ui/applicationBootstrap.js
+++ b/js/ui/applicationBootstrap.js
@@ -657,6 +657,7 @@ export default class ApplicationBootstrap {
app.subscriptionsLink = null;
app.forYouLink = null;
+ app.exploreLink = null;
app.notificationPortal = doc?.getElementById("notificationPortal") || null;
app.errorContainer = doc?.getElementById("errorContainer") || null;
diff --git a/tests/app/hydrate-sidebar-navigation.test.mjs b/tests/app/hydrate-sidebar-navigation.test.mjs
index cbcd5c26..602a198d 100644
--- a/tests/app/hydrate-sidebar-navigation.test.mjs
+++ b/tests/app/hydrate-sidebar-navigation.test.mjs
@@ -18,6 +18,7 @@ const VIEW_HTML = `
+