From 5ab213af6caa0ef3e3d2b9143f00bad95510e03e Mon Sep 17 00:00:00 2001 From: sD Date: Tue, 11 Aug 2020 19:52:48 +0200 Subject: apply the effects --- webAO/client.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'webAO/client.js') diff --git a/webAO/client.js b/webAO/client.js index 82427a5..0cefa5c 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1787,8 +1787,13 @@ async changeBackground(position) { } // apply effects + const effectinfo = this.chatmsg.effects.split('|'); fg.style.animation = ""; - fg.src = transparentPNG; + + if (effectinfo[0]) + fg.src = `${AO_HOST}themes/default/effects/${encodeURI(effectinfo[0].toLowerCase())}.webp`; + else + fg.src = transparentPNG; this.tick(); } -- cgit