logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: e57e6f509d19192dc32a1f18e5b1cc780dfd5fd1
parent: bea117a4b6b674472658339fcf1692cc7868beb9
Author: unarist <m.unarist@gmail.com>
Date:   Thu,  4 May 2017 22:50:09 +0900

Show emoji shortname by a tooltip (#2784)


Diffstat:

Mapp/javascript/mastodon/emoji.js4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/javascript/mastodon/emoji.js b/app/javascript/mastodon/emoji.js @@ -15,7 +15,7 @@ const unicodeToImage = str => { const filename = emojione.emojioneList[short].fname; const alt = emojione.convert(unicode.toUpperCase()); - return `<img draggable="false" class="emojione" alt="${alt}" src="/emoji/${filename}.svg" />`; + return `<img draggable="false" class="emojione" alt="${alt}" title="${short}" src="/emoji/${filename}.svg" />`; }); }; @@ -27,7 +27,7 @@ const shortnameToImage = str => str.replace(emojione.regShortNames, shortname => const unicode = emojione.emojioneList[shortname].unicode[emojione.emojioneList[shortname].unicode.length - 1]; const alt = emojione.convert(unicode.toUpperCase()); - return `<img draggable="false" class="emojione" alt="${alt}" src="/emoji/${unicode}.svg" />`; + return `<img draggable="false" class="emojione" alt="${alt}" title="${shortname}" src="/emoji/${unicode}.svg" />`; }); export default function emojify(text) {