mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Show emoji shortname by a tooltip (#2784)
This commit is contained in:
parent
bea117a4b6
commit
e57e6f509d
@ -15,7 +15,7 @@ const unicodeToImage = str => {
|
|||||||
const filename = emojione.emojioneList[short].fname;
|
const filename = emojione.emojioneList[short].fname;
|
||||||
const alt = emojione.convert(unicode.toUpperCase());
|
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 unicode = emojione.emojioneList[shortname].unicode[emojione.emojioneList[shortname].unicode.length - 1];
|
||||||
const alt = emojione.convert(unicode.toUpperCase());
|
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) {
|
export default function emojify(text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user