f
This commit is contained in:
parent
b07290ed14
commit
e3479ef642
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(id, post) {
|
async function MastodonReplylFunction(Name, post) {
|
||||||
let OtherPost = await MastodonAPI.GetStatus(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;
|
document.getElementsByTagName("body")[0].innerHTML = ShitHTML + document.getElementsByTagName("body")[0].innerHTML;
|
||||||
if (OtherPost.spoiler_text != "") {
|
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 {
|
} else {
|
||||||
document.getElementsByClassName("PostText").getElementById(id).innerHTML = OtherPost.content;
|
document.getElementsByClassName("PostText").getElementsByName(Name)[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").getElementById(id));
|
ApplyMedia(i, document.getElementsByClassName("Images").getElementsByName(Name)[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue