From 8a1ac197778aaf654472788d10461c855dca3b10 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Thu, 16 May 2019 15:41:49 -0500 Subject: when autoplay is off play animated emoji on hover --- app/javascript/flavours/glitch/util/emoji/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/util/emoji') diff --git a/app/javascript/flavours/glitch/util/emoji/index.js b/app/javascript/flavours/glitch/util/emoji/index.js index 82a1ef89c..2205cd7a3 100644 --- a/app/javascript/flavours/glitch/util/emoji/index.js +++ b/app/javascript/flavours/glitch/util/emoji/index.js @@ -28,8 +28,11 @@ const emojify = (str, customEmojis = {}) => { // now got a replacee as ':shortname:' // if you want additional emoji handler, add statements below which set replacement and return true. if (shortname in customEmojis) { - const filename = autoPlayGif ? customEmojis[shortname].url : customEmojis[shortname].static_url; - replacement = `${shortname}`; + if (autoPlayGif) { + replacement = `${shortname}`; + } else { + replacement = `${shortname}`; + } return true; } return false; -- cgit