Skip to content

Commit ea2829d

Browse files
authored
Merge pull request #1064 from VirtualWolf/main
Show the emoji shortcode in statuses when hovering, like Mastodon's native's frontend does
2 parents 71e8d42 + 0c9bf17 commit ea2829d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/emojify-text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function emojifyText(text, emojis = []) {
88
const { shortcode, staticUrl, url } = emoji;
99
text = text.replace(
1010
new RegExp(`:${shortcode}:`, 'g'),
11-
`<picture><source srcset="${staticUrl}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${url}" alt=":${shortcode}:" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" /></picture>`,
11+
`<picture><source srcset="${staticUrl}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${url}" alt=":${shortcode}:" title=":${shortcode}:" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" /></picture>`,
1212
);
1313
});
1414
// console.log(text, emojis);

0 commit comments

Comments
 (0)