This commit is contained in:
CatAClock 2025-07-16 19:24:24 -07:00
parent 4a07c41639
commit e7273174ae

View file

@ -109,7 +109,7 @@ async function GetPost() {
ApplyMedia(i, document.getElementsByClassName("Images")[0]);
}
}
// Now time to see if there are any parents
// Now time to see if there are any parents.
let NumberOfThreads = 0;
let TemporaryPost = post;
while (TemporaryPost.in_reply_to_id != null) {
@ -153,12 +153,19 @@ async function GetPost() {
SetFavorite();
SetBoost();
// Now time to see if there are any parents.
if (post.hasOwnProperty("reply")) {
let TemporaryPost = await BlueskyReplyFunction("0", post.reply.parent, post.reply.parent.author);
// Now time to see if there are any grandparents.
if (TemporaryPost.value.hasOwnProperty("reply")) {
TemporaryPost = await BlueskyReplyFunction("1", TemporaryPost.value.reply.parent, post.reply.grandparentAuthor);
let NumberOfThreads = 0;
let TemporaryPost = post;
while (TemporaryPost.reply.parent != null) {
TemporaryPost = await BlueskyReplyFunction("0", TemporaryPost.reply.parent, TemporaryPost.reply.parent.author).posts[0];
ThreadedPost.push(TemporaryPost);
// Any replies? Give them the thing :3
for (let i of document.getElementsByClassName(NumberOfThreads)) {
let TempID = NumberOfThreads;
i.onclick = (event) => {
SetThreadPost(ThreadedPost[TempID], i);
}
}
NumberOfThreads += 1;
}
} else {
document.getElementsByClassName("PostText")[0].innerHTML = "Nothing to load.";