From cb91e383ad5f6d4fbf03b6da0860a9ff1b6eb47d Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Fri, 11 Mar 2022 23:48:07 +0100 Subject: revert webp charicons --- webAO/client.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'webAO/client.js') 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]; -- cgit