From f21b060da947c071426f5e8966c29bc3bb6beb6d Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Sun, 11 Aug 2024 16:34:10 -0500 Subject: [PATCH] fixed bug --- .dist/guild.js | 2 +- .dist/localuser.js | 2 -- webpage/guild.ts | 2 +- webpage/localuser.ts | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.dist/guild.js b/.dist/guild.js index ac7fe2f..3b4c21b 100644 --- a/.dist/guild.js +++ b/.dist/guild.js @@ -256,7 +256,7 @@ class Guild { } else { const div = document.createElement("div"); - let build = ""; + let build = this.properties.name.replace(/'s /g, " ").replace(/\w+/g, word => word[0]).replace(/\s/g, ""); for (const char of this.properties.name.split(" ")) { build += char[0]; } diff --git a/.dist/localuser.js b/.dist/localuser.js index db4a26f..3e1001f 100644 --- a/.dist/localuser.js +++ b/.dist/localuser.js @@ -112,8 +112,6 @@ class Localuser { User.clear(); } async initwebsocket() { - if (!this.initialized) - return; let returny = null; const promise = new Promise((res) => { returny = res; }); this.ws = new WebSocket(this.serverurls.gateway.toString() + "?encoding=json&v=9" + (DecompressionStream ? "&compress=zlib-stream" : "")); diff --git a/webpage/guild.ts b/webpage/guild.ts index 282eb1f..969e65a 100644 --- a/webpage/guild.ts +++ b/webpage/guild.ts @@ -266,7 +266,7 @@ class Guild{ Guild.contextmenu.bind(img,this); }else{ const div=document.createElement("div"); - let build=""; + let build=this.properties.name.replace(/'s /g, " ").replace(/\w+/g, word => word[0]).replace(/\s/g, ""); for(const char of this.properties.name.split(" ")){ build+=char[0]; } diff --git a/webpage/localuser.ts b/webpage/localuser.ts index 97467b9..4b8aee7 100644 --- a/webpage/localuser.ts +++ b/webpage/localuser.ts @@ -118,7 +118,6 @@ class Localuser{ User.clear(); } async initwebsocket():Promise{ - if(!this.initialized) return; let returny=null const promise=new Promise((res)=>{returny=res}); this.ws = new WebSocket(this.serverurls.gateway.toString()+"?encoding=json&v=9"+(DecompressionStream?"&compress=zlib-stream":""));