aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2021-03-13 16:30:55 +0100
committerstonedDiscord <Tukz@gmx.de>2021-03-13 16:30:55 +0100
commit1e59ba929a88ef3508a62e7b5afa754681be7ae4 (patch)
tree1c6c6aec98a091de9bb27884c488e3b4c8333283 /webAO/client.js
parent8feb3f65188214486f6897d94e484acebd6d08a2 (diff)
add webp img and code
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/webAO/client.js b/webAO/client.js
index e88d18f..6cc6b9b 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1862,17 +1862,20 @@ async changeBackground(position) {
const gif_s = document.getElementById("client_" + pairID + "_gif");
const png_s = document.getElementById("client_" + pairID + "_png");
const apng_s = document.getElementById("client_" + pairID +"_apng");
+ const webp_s = document.getElementById("client_" + pairID +"_webp");
if (this.lastChar !== this.chatmsg.name) {
//hide the last sprite
gif_s.src = transparentPNG;
png_s.src = transparentPNG;
apng_s.src = transparentPNG;
+ webp_s.src = transparentPNG;
}
gif_s.src = characterFolder + `${encodeURI(charactername)}/${encodeURI(prefix)}${encodeURI(emotename)}.gif`;
png_s.src = characterFolder + `${encodeURI(charactername)}/${encodeURI(emotename)}.png`;
apng_s.src = characterFolder + `${encodeURI(charactername)}/${encodeURI(prefix)}${encodeURI(emotename)}.apng`;
+ webp_s.src = characterFolder + `${encodeURI(charactername)}/${encodeURI(prefix)}${encodeURI(emotename)}.webp`;
}
/**