From 7f80a528ba81362c554adef6aaecc0001a5adf63 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Sun, 18 Aug 2024 11:13:54 -0500 Subject: [PATCH] Add safety check --- .dist/channel.js | 3 +++ webpage/channel.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.dist/channel.js b/.dist/channel.js index 668463a..83091e2 100644 --- a/.dist/channel.js +++ b/.dist/channel.js @@ -798,6 +798,9 @@ class Channel { return; this.infinitefocus = true; const messages = document.getElementById("channelw"); + for (const thing of messages.getElementsByClassName("messagecontainer")) { + thing.remove(); + } const loading = document.getElementById("loadingdiv"); const removetitle = document.getElementById("removetitle"); //messages.innerHTML=""; diff --git a/webpage/channel.ts b/webpage/channel.ts index 7d5eb5a..6f1e2d5 100644 --- a/webpage/channel.ts +++ b/webpage/channel.ts @@ -802,6 +802,9 @@ class Channel{ if(this.infinitefocus) return; this.infinitefocus=true; const messages=document.getElementById("channelw"); + for(const thing of messages.getElementsByClassName("messagecontainer")){ + thing.remove(); + } const loading=document.getElementById("loadingdiv"); const removetitle=document.getElementById("removetitle"); //messages.innerHTML="";