diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-11 23:48:07 +0100 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-03-11 23:48:07 +0100 |
| commit | cb91e383ad5f6d4fbf03b6da0860a9ff1b6eb47d (patch) | |
| tree | c1544282f578c3ff89d7c165b3e1f4662e45f2fd | |
| parent | 700afb7634724c4646c7f357744ab0a8b0cfac77 (diff) | |
revert webp charicons
| -rw-r--r-- | webAO/client.js | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/webAO/client.js b/webAO/client.js index 7b0c9cd..d6ab5fb 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -781,24 +781,7 @@ class Client extends EventEmitter { if (chargs[0]) { let cini = {}; const cswap = {}; - - const getCharIcon = async () => { - const extensions = [ - '.png', - '.webp', - ]; - const charIconBaseUrl = `${AO_HOST}characters/${encodeURI(chargs[0].toLowerCase())}/char_icon`; - for (let i = 0; i < extensions.length; i++) { - const fileUrl = charIconBaseUrl + extensions[i]; - const exists = await fileExists(fileUrl); - if (exists) { - return fileUrl; - } - } - }; - - const charIconUrlResponse = await getCharIcon(); - const icon = charIconUrlResponse || transparentPNG; + const icon = `${AO_HOST}characters/${encodeURI(chargs[0].toLowerCase())}/char_icon.png`; const img = document.getElementById(`demo_${charid}`); img.alt = chargs[0]; |
