h
This commit is contained in:
parent
650fa74f0e
commit
602a1a551b
1 changed files with 5 additions and 5 deletions
|
@ -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.
|
// 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(Name, post) {
|
async function MastodonReplylFunction(Id, post) {
|
||||||
let OtherPost = await MastodonAPI.GetStatus(post);
|
let OtherPost = await MastodonAPI.GetStatus(post);
|
||||||
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/>";
|
let ShitHTML = "<header> <h1 class=\"Handle " + Id + "\"> " + website + "</h1> <h1 class=\"Origin " + Id + "\"> " + OtherPost.account.acct + "</h1> </header> <p class=\"PostText " + Id + "\"></p> <div class=\"Images " + Id + "\"></div> <hr/>";
|
||||||
document.getElementsByTagName("body")[0].innerHTML = ShitHTML + document.getElementsByTagName("body")[0].innerHTML;
|
document.getElementsByTagName("body")[0].innerHTML = ShitHTML + document.getElementsByTagName("body")[0].innerHTML;
|
||||||
if (OtherPost.spoiler_text != "") {
|
if (OtherPost.spoiler_text != "") {
|
||||||
document.getElementsByClassName("PostText")[0].getElementsByName(Name)[0].innerHTML = "WARNING: " + OtherPost.spoiler_text;
|
document.getElementsByClassName("PostText " + Id)[0].innerHTML = "WARNING: " + OtherPost.spoiler_text;
|
||||||
} else {
|
} else {
|
||||||
document.getElementsByClassName("PostText")[0].getElementsByName(Name)[0].innerHTML = OtherPost.content;
|
document.getElementsByClassName("PostText " + Id)[0].innerHTML = OtherPost.content;
|
||||||
if (OtherPost.media_attachments.length != 0) {
|
if (OtherPost.media_attachments.length != 0) {
|
||||||
for (let i of OtherPost.media_attachments) {
|
for (let i of OtherPost.media_attachments) {
|
||||||
ApplyMedia(i, document.getElementsByClassName("Images").getElementsByName(Name)[0]);
|
ApplyMedia(i, document.getElementsByClassName("Images " + Id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue