[Glitch] Play animated custom emoji on hover

Port 7de8c51873 to glitch-soc
This commit is contained in:
ThibG
2019-07-21 18:10:40 +02:00
committed by Thibaut Girka
parent 621590b4ab
commit c1231a846a
5 changed files with 128 additions and 3 deletions

View File

@ -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;