diff options
| author | stonedDiscord <Tukz@gmx.de> | 2025-09-16 10:27:24 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2025-09-16 10:27:24 +0200 |
| commit | 218e00467a6ee04ae863fb232c0cc11145a9c1c0 (patch) | |
| tree | e09e5d037d34c8b83925128a4c45742c13bafa45 /webAO/client/handleCharacterInfo.ts | |
| parent | 7a2666ded1d85288786330c629e1f8a447b25954 (diff) | |
forgot charicons
Diffstat (limited to 'webAO/client/handleCharacterInfo.ts')
| -rw-r--r-- | webAO/client/handleCharacterInfo.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/webAO/client/handleCharacterInfo.ts b/webAO/client/handleCharacterInfo.ts index a364b5e..3764c84 100644 --- a/webAO/client/handleCharacterInfo.ts +++ b/webAO/client/handleCharacterInfo.ts @@ -6,13 +6,12 @@ import fileExists from "../utils/fileExists"; import { AO_HOST } from "./aoHost"; export const getCharIcon = async (img: HTMLImageElement, charname: string) => { - const charicon_extensions = [".png", ".webp"]; img.alt = charname; const charIconBaseUrl = `${AO_HOST}characters/${encodeURI( charname.toLowerCase(), )}/char_icon`; - for (let i = 0; i < charicon_extensions.length; i++) { - const fileUrl = charIconBaseUrl + charicon_extensions[i]; + for (let i = 0; i < client.charicon_extensions.length; i++) { + const fileUrl = charIconBaseUrl + client.charicon_extensions[i]; const exists = await fileExists(fileUrl); if (exists) { img.alt = charname; |
