diff options
| author | stonedDiscord <Tukz@gmx.de> | 2025-09-03 17:37:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-03 17:37:36 +0200 |
| commit | 0d2a3994e203755702ebe4afbd0f3c721ee8ce38 (patch) | |
| tree | 9347303eaa9daad5e10420ab1d90e24593c70df1 /webAO/client/handleCharacterInfo.ts | |
| parent | 8e46e304f4defc7f9f4eb01922812b28a8585307 (diff) | |
| parent | 035951baf3819f56093f7156b345689aa5093f28 (diff) | |
Merge pull request #270 from AttorneyOnline/ext
Let the webhost specify the extensions use
Diffstat (limited to 'webAO/client/handleCharacterInfo.ts')
| -rw-r--r-- | webAO/client/handleCharacterInfo.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/client/handleCharacterInfo.ts b/webAO/client/handleCharacterInfo.ts index 3f81e57..a364b5e 100644 --- a/webAO/client/handleCharacterInfo.ts +++ b/webAO/client/handleCharacterInfo.ts @@ -6,13 +6,13 @@ import fileExists from "../utils/fileExists"; import { AO_HOST } from "./aoHost"; export const getCharIcon = async (img: HTMLImageElement, charname: string) => { - const extensions = [".png", ".webp"]; + const charicon_extensions = [".png", ".webp"]; img.alt = charname; const charIconBaseUrl = `${AO_HOST}characters/${encodeURI( charname.toLowerCase(), )}/char_icon`; - for (let i = 0; i < extensions.length; i++) { - const fileUrl = charIconBaseUrl + extensions[i]; + for (let i = 0; i < charicon_extensions.length; i++) { + const fileUrl = charIconBaseUrl + charicon_extensions[i]; const exists = await fileExists(fileUrl); if (exists) { img.alt = charname; |
