mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 08:38:22 +01:00
add my account :3
This commit is contained in:
parent
1168511f13
commit
330937cbe6
1 changed files with 20 additions and 2 deletions
|
@ -661,7 +661,11 @@ But Please note that unofficial instances can add the same lock icon, so please
|
||||||
Customize PokeTube
|
Customize PokeTube
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href="/account-create" style="text-decoration: none;" class="dropdown__item">
|
||||||
|
<i class="fa-light fa-user"></i>
|
||||||
|
Account
|
||||||
|
</a>
|
||||||
|
|
||||||
<a href="/settings" style="text-decoration: none;" class="dropdown__item">
|
<a href="/settings" style="text-decoration: none;" class="dropdown__item">
|
||||||
<i class="fa-light fa-globe"></i>
|
<i class="fa-light fa-globe"></i>
|
||||||
Region settings </a>
|
Region settings </a>
|
||||||
|
@ -997,7 +1001,7 @@ display: block; !important;" autoplay controls
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="subscribe-button"><a href="https://www.youtube.com/channel/<%=video?.Channel.id || k.Video.Channel.id%>?view_as=subscriber?sub_confirmation=1">Suscribe</a></button>
|
<button class="subscribe-button"><a id="sub">Suscribe</a></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -1758,6 +1762,20 @@ if (!urlParams.has('hl') && !urlParams.has('region') && languageCode && regionCo
|
||||||
location.href = currentURL + `®ion=${regionCode}&hl=${languageCode}`;
|
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 video links should have the parameters added to their href attributes
|
||||||
|
|
||||||
// Now, all the selected links should have the parameters appended
|
// Now, all the selected links should have the parameters appended
|
||||||
|
|
Loading…
Reference in a new issue