diff --git a/JS/index.js b/JS/index.js index c3acb18..ff7a529 100644 --- a/JS/index.js +++ b/JS/index.js @@ -188,7 +188,9 @@ async function PosterContainerUpdate(Direction) { switch(countergroup) { // Mastodon case 0: + // Begin by having the website we are using get pushed to the expanded view array and clean out the HTML. WebsiteAPIType.push("Mastodon"); + i.getElementsByClassName("PostContent")[0].innerHTML = ""; if (MastodonLoadedFeed[CurrentThing + counter] == undefined) { let TempFeed = await MastodonAPI.GetTimeline(MastodonLoadedFeed[CurrentThing + counter - 1].id); MastodonLoadedFeed = MastodonLoadedFeed.concat(TempFeed); @@ -214,7 +216,9 @@ async function PosterContainerUpdate(Direction) { break; // Bsky case 1: + // Begin by having the website we are using get pushed to the expanded view array and clean out the HTML. WebsiteAPIType.push("Bluesky"); + i.getElementsByClassName("PostContent")[0].innerHTML = ""; if (BlueskyLoadedFeed[CurrentThing + counter] == undefined) { let TempFeed = await BlueskyAPI.GetTimeline(BlueskyLoadedFeed[CurrentThing + counter - 1].post.indexedAt).then((response) => response.feed) BlueskyLoadedFeed = BlueskyLoadedFeed.concat(TempFeed);