This commit is contained in:
CatAClock 2025-07-16 19:34:51 -07:00
parent c3fba0c0d8
commit cd2ce6b3b3

View file

@ -156,7 +156,7 @@ async function GetPost() {
let NumberOfThreads = 0;
let TemporaryPost = post;
while (TemporaryPost.reply.parent != null) {
TemporaryPost = await BlueskyReplyFunction("0", TemporaryPost.reply.parent, TemporaryPost.reply.parent.author);
TemporaryPost = await BlueskyReplyFunction("0", TemporaryPost.reply.parent);
ThreadedPost.push(TemporaryPost);
// Any replies? Give them the thing :3
for (let i of document.getElementsByClassName(NumberOfThreads)) {
@ -193,8 +193,7 @@ async function MastodonReplylFunction(Id, post) {
async function BlueskyReplyFunction(Id, post) {
let OtherPost = await BlueskyAPI.GetPosts([post.uri]);
OtherPost = OtherPost.posts[0];
console.log(OtherPost);
let ShitHTML = "<header> <h1 class=\"Handle " + Id + "\"> " + Id.author.handle + "</h1> <h2 class=\"Origin " + Id + "\"> " + website + "</h2> </header> <p class=\"PostText " + Id + "\"></p> <div class=\"Images " + Id + "\"></div> <hr/>";
let ShitHTML = "<header> <h1 class=\"Handle " + Id + "\"> " + post.author.handle + "</h1> <h2 class=\"Origin " + Id + "\"> " + website + "</h2> </header> <p class=\"PostText " + Id + "\"></p> <div class=\"Images " + Id + "\"></div> <hr/>";
document.getElementsByTagName("body")[0].insertAdjacentHTML("afterbegin", ShitHTML);
Text = BlueskyAPI.ApplyFacets(OtherPost.record, OtherPost.record.text);
Text = Text.replace(/\r?\n|\r/g, "<br/>");
@ -207,7 +206,7 @@ async function BlueskyReplyFunction(Id, post) {
} else {
document.getElementsByClassName("PostText " + Id)[0].innerHTML = Text;
if (OtherPost.record.hasOwnProperty("embed")) {
ApplyMedia(OtherPost.record.embed, document.getElementsByClassName("Images " + Id)[0], Id.author.did);
ApplyMedia(OtherPost.record.embed, document.getElementsByClassName("Images " + Id)[0], post.author.did);
}
}
return OtherPost;