From bd6ad4a0aaa3685c678e4665a9d195f7fcae735b Mon Sep 17 00:00:00 2001 From: CatAClock Date: Sun, 11 May 2025 16:14:40 -0700 Subject: [PATCH] fix a bug where the innerHTML did not reset on reload. --- JS/index.js | 4 ++++ 1 file changed, 4 insertions(+) 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);