diff --git a/JS/expanded.js b/JS/expanded.js index ff4559a..8caa849 100644 --- a/JS/expanded.js +++ b/JS/expanded.js @@ -83,20 +83,19 @@ async function SetThreadPost(element, i) { // Functions and things. async function GetPost() { if (website == "Mastodon") { + // Check for a reblog. + if (post.reblog != null) { + document.getElementsByClassName("Handle Regular")[0].innerHTML = post.reblog + " ( R: " + post.account.username + " )"; + } else { + document.getElementsByClassName("Handle Regular")[0].innerHTML = post.account.username; + } + document.getElementsByClassName("PostText Regular")[0].innerHTML = post.content; // Set the texts. It's opposite because "setting" causes it to switch. post = await MastodonAPI.GetStatus(post.id); FavoriteFlipper = !(post.favourited); BoostFlipper = !(post.reblogged); SetFavorite(); SetBoost(); - // Check for a reblog. - if (post.reblog != null) { - document.getElementsByClassName("Handle Regular")[0].innerHTML = post.reblog.account.username + " ( R: " + post.account.username + " )"; - post = post.reblog; - } else { - document.getElementsByClassName("Handle Regular")[0].innerHTML = post.account.username; - } - document.getElementsByClassName("PostText Regular")[0].innerHTML = post.content; // Show the image if it exists. if (post.media_attachments.length != 0) { for (let i of post.media_attachments) { diff --git a/JS/index.js b/JS/index.js index d34793b..ece0eab 100644 --- a/JS/index.js +++ b/JS/index.js @@ -232,7 +232,10 @@ async function PosterContainerUpdate(Direction) { // put the reblog into the regular post; Make changes as necessary. if (MastodonLoadedFeed[CurrentThing + counter].reblog != null) { i.getElementsByClassName("Username")[0].innerHTML = MastodonLoadedFeed[CurrentThing + counter].reblog.account.username + " ( R: " + MastodonLoadedFeed[CurrentThing + counter].account.username + " )"; + // Fix a reblog issue. + let ReblogFix = MastodonLoadedFeed[CurrentThing + counter].account.username; MastodonLoadedFeed[CurrentThing + counter] = MastodonLoadedFeed[CurrentThing + counter].reblog; + MastodonLoadedFeed[CurrentThing + counter].reblog = ReblogFix; } else { i.getElementsByClassName("Username")[0].innerHTML = MastodonLoadedFeed[CurrentThing + counter].account.username }