diff options
| author | stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> | 2020-11-09 20:33:56 +0100 |
|---|---|---|
| committer | stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> | 2020-11-09 20:33:56 +0100 |
| commit | 27970910f7cdf588d083e27178eb794f1d9b31d0 (patch) | |
| tree | 0e51f3a757b4a7c3d98a09af2b072c1ffb7555ec /webAO | |
| parent | ec25e38d4953600f71373d5681f948b9a38296c1 (diff) | |
display the custom objection button if there is a custom.gif in the characters folder
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/client.js | 7 |
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); } |
