Public Timelines improvements and fixes #14

Merged
CatAClock merged 10 commits from PublicTimelines into main 2025-05-08 22:04:23 +00:00
3 changed files with 13 additions and 7 deletions
Showing only changes of commit a59005da83 - Show all commits

View file

@ -12,10 +12,10 @@
<body style="margin: 0px; text-align: center;"> <body style="margin: 0px; text-align: center;">
<header> <header>
<h1 class="Handle">Nothing so far.</h1> <h1 class="Handle"></h1>
<h2 class="Origin">Bsky/Mastodon.</h2> <h2 class="Origin">Bsky/Mastodon (TODO)</h2>
<p>Text would go here</p> <p class="DetailedText"></p>
<p>Image here if it is a thing</p> <p>Image here if it is a thing (TODO)</p>
<p onclick="history.back()"><b>Back</b></p> <p onclick="history.back()"><b>Back</b></p>
</header> </header>
</body> </body>

View file

@ -0,0 +1,5 @@
let content = decodeURI(document.location.href.split("content=")[1]);
let username = decodeURI(document.location.href.split("username=")[1].split("&content")[0]);
document.getElementsByClassName("Handle")[0].innerHTML = username;
document.getElementsByClassName("DetailedText")[0].innerHTML = content;

View file

@ -103,8 +103,10 @@ ArrowsButton[0].onclick = (event) => {
for (let i of ClickableContainers) { for (let i of ClickableContainers) {
i.onclick = (event) => { i.onclick = (event) => {
let content = i.getElementsByClassName("PostContent")[0].innerHTML
let username = i.getElementsByClassName("Username")[0].innerHTML
// Save some info // Save some info
window.location.href = "./HTML/expanded.html"; window.location.href = "./HTML/expanded.html?username=" + username + "&content=" + content;
} }
} }
@ -153,10 +155,9 @@ async function PosterContainerUpdate(Direction) {
if (Mastodon == false) { if (Mastodon == false) {
countergroup = countergroup + 1; countergroup = countergroup + 1;
} }
let CenterContainer = document.getElementsByClassName("PostContainer")[2].children;
// This var is meant to stop "already seen" posts. // This var is meant to stop "already seen" posts.
let BlueskyPostsDup = []; let BlueskyPostsDup = [];
for (let i of CenterContainer) { for (let i of ClickableContainers) {
switch(countergroup) { switch(countergroup) {
// Mastodon // Mastodon
case 0: case 0: