about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-05-04 22:50:09 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-04 15:50:09 +0200
commite57e6f509d19192dc32a1f18e5b1cc780dfd5fd1 (patch)
treee017d3715fe100fcb7749631dd40aaffd6811f17 /app/javascript
parentbea117a4b6b674472658339fcf1692cc7868beb9 (diff)
Show emoji shortname by a tooltip (#2784)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/emoji.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/emoji.js b/app/javascript/mastodon/emoji.js
index eee657b86..01d01fb72 100644
--- 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) {