diff options
| author | sD <stoned@derpymail.org> | 2020-04-19 18:31:54 +0200 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-04-19 18:31:54 +0200 |
| commit | f7604b2e750bab3d8ccdd8b241c0cba05a6ac490 (patch) | |
| tree | e0ae5f25b4c8ddb3733d661fcfeb71d550541ff5 | |
| parent | 4680d4486db9253115fed062ac30ed90c69dfa08 (diff) | |
add text centering
| -rw-r--r-- | webAO/client.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webAO/client.js b/webAO/client.js index 54458e5..1913d71 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1667,6 +1667,14 @@ async changeBackground(position) { this.blipChannels.forEach(channel => channel.src = `${AO_HOST}sounds/general/sfx-blip${encodeURI(this.chatmsg.blips.toLowerCase())}.wav`); + // process markup + if(this.chatmsg.content.startsWith("~~")) { + chatBoxInner.style.textAlign = "center"; + this.chatmsg.content = this.chatmsg.content.substring(2, this.chatmsg.content.length); + } else { + chatBoxInner.style.textAlign = "initial"; + } + this.tick(); } |
