aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorstonedDiscord <10584181+stonedDiscord@users.noreply.github.com>2020-11-09 20:33:56 +0100
committerstonedDiscord <10584181+stonedDiscord@users.noreply.github.com>2020-11-09 20:33:56 +0100
commit27970910f7cdf588d083e27178eb794f1d9b31d0 (patch)
tree0e51f3a757b4a7c3d98a09af2b072c1ffb7555ec /webAO/client.js
parentec25e38d4953600f71373d5681f948b9a38296c1 (diff)
display the custom objection button if there is a custom.gif in the characters folder
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 7d06960..cac9f74 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -846,6 +846,7 @@ class Client extends EventEmitter {
inifile: cini,
muted: false
};
+
} else {
console.warn("missing charid " + charid);
let img = document.getElementById(`demo_${charid}`);
@@ -1444,6 +1445,12 @@ class Client extends EventEmitter {
alt="${emotes[i].desc}"
class="emote_button"
onclick="pickEmotion(${i})">`;
+
+ if(await fileExists(AO_HOST + "characters/" + encodeURI(me.name.toLowerCase()) + "/custom.gif"))
+ document.getElementById("button_4").style.display = "";
+ else
+ document.getElementById("button_4").style.display = "none";
+
} catch (e) {
console.error("missing emote " + i);
}