From 12ecdce4217ab7686c0f57789801f8c6a20c9644 Mon Sep 17 00:00:00 2001 From: CatAClock Date: Wed, 16 Jul 2025 19:11:18 -0700 Subject: [PATCH] let's do bsky now --- src/HTTP/JS/expanded.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/HTTP/JS/expanded.js b/src/HTTP/JS/expanded.js index 6df7125..f5826b4 100644 --- a/src/HTTP/JS/expanded.js +++ b/src/HTTP/JS/expanded.js @@ -154,10 +154,10 @@ async function GetPost() { SetBoost(); // Now time to see if there are any parents. if (post.hasOwnProperty("reply")) { - Parentpost = await BlueskyReplyFunction("Parent", post.reply.parent, post.reply.parent.author); + Parentpost = await BlueskyReplyFunction("0", post.reply.parent, post.reply.parent.author); // Now time to see if there are any grandparents. if (Parentpost.value.hasOwnProperty("reply")) { - GrandParentpost = await BlueskyReplyFunction("GrandParent", Parentpost.value.reply.parent, post.reply.grandparentAuthor); + GrandParentpost = await BlueskyReplyFunction("1", Parentpost.value.reply.parent, post.reply.grandparentAuthor); } } } else { @@ -183,23 +183,23 @@ async function MastodonReplylFunction(Id, post) { return OtherPost; } -// TODO -async function BlueskyReplyFunction(ClassName, post, OtherAuthor) { +async function BlueskyReplyFunction(Id, post, OtherAuthor) { let OtherPost = await BlueskyAPI.GetRecord(post.uri.split("/")[2], post.uri.split("/")[3], post.uri.split("/")[4]); - document.getElementsByClassName("Origin " + ClassName)[0].innerHTML = website; - document.getElementsByClassName("Handle " + ClassName)[0].innerHTML = OtherAuthor.handle; + console.log(OtherPost); + let ShitHTML = "

" + OtherAuthor.handle + "

" + website + "


"; + document.getElementsByTagName("body")[0].insertAdjacentHTML("afterbegin", ShitHTML); Text = BlueskyAPI.ApplyFacets(OtherPost.value, OtherPost.value.text); Text = Text.replace(/\r?\n|\r/g, "
"); // Sensitive topic :3 if (OtherPost.value.hasOwnProperty("labels") && OtherPost.value.labels.length != 0) { document.getElementsByClassName("PostText " + ClassName)[0].innerHTML = "LABELS APPLIED: "; for (let lab of OtherPost.value.labels.values) { - document.getElementsByClassName("PostText " + ClassName)[0].innerHTML += lab.val + " "; + document.getElementsByClassName("PostText " + Id)[0].innerHTML += lab.val + " "; } } else { - document.getElementsByClassName("PostText " + ClassName)[0].innerHTML = Text; + document.getElementsByClassName("PostText " + Id)[0].innerHTML = Text; if (OtherPost.value.hasOwnProperty("embed")) { - ApplyMedia(OtherPost.value.embed, document.getElementsByClassName("Images " + ClassName)[0], OtherAuthor.did); + ApplyMedia(OtherPost.value.embed, document.getElementsByClassName("Images " + Id)[0], OtherAuthor.did); } } return OtherPost;