diff --git a/html/poketube.ejs b/html/poketube.ejs
index d7591fe4..96c2661b 100644
--- a/html/poketube.ejs
+++ b/html/poketube.ejs
@@ -661,7 +661,11 @@ But Please note that unofficial instances can add the same lock icon, so please
Customize PokeTube
-
+
+
+Account
+
+
Region settings
@@ -997,7 +1001,7 @@ display: block; !important;" autoplay controls
-
+
@@ -1758,6 +1762,20 @@ if (!urlParams.has('hl') && !urlParams.has('region') && languageCode && regionCo
location.href = currentURL + `®ion=${regionCode}&hl=${languageCode}`;
}
+var anchor = document.getElementById("sub");
+
+// Check if there's a user ID in localStorage
+var userID = localStorage.getItem("UserID");
+
+if (userID) {
+ // If user ID exists in localStorage, set the href attribute
+ anchor.href = `/api/set-channel-subs?ID=${userID}&channelName=<%=k.Video.Channel.Name%>&avatar=https://p.poketube.fun/<%= k.Video.Channel.Avatar[1].$t %>&channelID=<%=video?.Channel.id || k.Video.Channel.id %>`;
+} else {
+ // If user ID doesn't exist in localStorage, you can handle it as needed
+ console.log("User ID not found in localStorage");
+ // Optionally, you can set a default href or display an error message.
+}
+
// Now, all the selected video links should have the parameters added to their href attributes
// Now, all the selected links should have the parameters appended