aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-03-11 23:48:07 +0100
committerstonedDiscord <Tukz@gmx.de>2022-03-11 23:48:07 +0100
commitcb91e383ad5f6d4fbf03b6da0860a9ff1b6eb47d (patch)
treec1544282f578c3ff89d7c165b3e1f4662e45f2fd
parent700afb7634724c4646c7f357744ab0a8b0cfac77 (diff)
revert webp charicons
-rw-r--r--webAO/client.js19
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];