This commit is contained in:
CatAClock 2025-07-16 18:08:57 -07:00
parent b07290ed14
commit e3479ef642

View file

@ -174,17 +174,17 @@ async function GetPost() {
}
// Because of repeat code, we can put it into it's own function. Hell, more of a thread can be added later.
async function MastodonReplylFunction(id, post) {
async function MastodonReplylFunction(Name, post) {
let OtherPost = await MastodonAPI.GetStatus(post);
let ShitHTML = "<header> <h1 id=" + id + " class=\"Handle\"> " + website + "</h1> <h1 id=" + id + " class=\"Origin\"> " + OtherPost.account.acct + "</h1> </header> <p id=" + id + " class=\"PostText\"></p> <div id=" + id + " class=\"Images\"></div> <hr/>";
let ShitHTML = "<header> <h1 name=" + Name + " class=\"Handle\"> " + website + "</h1> <h1 name=" + Name + " class=\"Origin\"> " + OtherPost.account.acct + "</h1> </header> <p name=" + Name + " class=\"PostText\"></p> <div name=" + Name + " class=\"Images\"></div> <hr/>";
document.getElementsByTagName("body")[0].innerHTML = ShitHTML + document.getElementsByTagName("body")[0].innerHTML;
if (OtherPost.spoiler_text != "") {
document.getElementsByClassName("PostText").getElementById(id).innerHTML = "WARNING: " + OtherPost.spoiler_text;
document.getElementsByClassName("PostText")[0].getElementsByName(Name)[0].innerHTML = "WARNING: " + OtherPost.spoiler_text;
} else {
document.getElementsByClassName("PostText").getElementById(id).innerHTML = OtherPost.content;
document.getElementsByClassName("PostText").getElementsByName(Name)[0].innerHTML = OtherPost.content;
if (OtherPost.media_attachments.length != 0) {
for (let i of OtherPost.media_attachments) {
ApplyMedia(i, document.getElementsByClassName("Images").getElementById(id));
ApplyMedia(i, document.getElementsByClassName("Images").getElementsByName(Name)[0]);
}
}
}