about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/emoji
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-21 18:10:40 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-07-21 18:10:40 +0200
commit7de8c51873b51d8450f7a6597a43d454964d0407 (patch)
tree38d3cbb721e574595cf251fe30441cbd1c107919 /app/javascript/mastodon/features/emoji
parent043d52f785d8f3d0fa31cde8f5e4c1991888e887 (diff)
Play animated custom emoji on hover (#11348)
* Play animated custom emoji on hover in status

* Play animated custom emoji on hover in display names

* Play animated custom emoji on hover in bios/bio fields

* Add support for animation on hover on public pages emojis too

* Fix tests

* Code style cleanup
Diffstat (limited to 'app/javascript/mastodon/features/emoji')
-rw-r--r--app/javascript/mastodon/features/emoji/emoji.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/emoji/emoji.js b/app/javascript/mastodon/features/emoji/emoji.js
index 01b5a6664..359bb7ffd 100644
--- a/app/javascript/mastodon/features/emoji/emoji.js
+++ b/app/javascript/mastodon/features/emoji/emoji.js
@@ -29,7 +29,7 @@ const emojify = (str, customEmojis = {}) => {
         // 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 = `<img draggable="false" class="emojione" alt="${shortname}" title="${shortname}" src="${filename}" />`;
+          replacement = `<img draggable="false" class="emojione custom-emoji" alt="${shortname}" title="${shortname}" src="${filename}" data-original="${customEmojis[shortname].url}" data-static="${customEmojis[shortname].static_url}" />`;
           return true;
         }
         return false;