Browse Source

Show emoji shortname by a tooltip (#2784)

closed-social-glitch-2
unarist 7 years ago
committed by Eugen Rochko
parent
commit
e57e6f509d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/javascript/mastodon/emoji.js

+ 2
- 2
app/javascript/mastodon/emoji.js View File

@ -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) {

Loading…
Cancel
Save