implement autoplay gifs for custom emoji
This commit is contained in:
parent
f1eaee4674
commit
48df08bd31
|
@ -349,12 +349,13 @@
|
||||||
originalAccount: (originalStatus) => originalStatus.account,
|
originalAccount: (originalStatus) => originalStatus.account,
|
||||||
originalMediaAttachments: (originalStatus) => originalStatus.media_attachments,
|
originalMediaAttachments: (originalStatus) => originalStatus.media_attachments,
|
||||||
statusId: (originalStatus) => originalStatus.id,
|
statusId: (originalStatus) => originalStatus.id,
|
||||||
emojifiedContent: (originalStatus) => {
|
emojifiedContent: (originalStatus, $autoplayGifs) => {
|
||||||
let status = originalStatus
|
let status = originalStatus
|
||||||
let content = status.content
|
let content = status.content
|
||||||
if (status.emojis && status.emojis.length) {
|
if (status.emojis && status.emojis.length) {
|
||||||
for (let emoji of status.emojis) {
|
for (let emoji of status.emojis) {
|
||||||
let { shortcode, url } = emoji
|
let { shortcode, url, url_static } = emoji
|
||||||
|
let urlToUse = $autoplayGifs ? url : url_static
|
||||||
let shortcodeWithColons = `:${shortcode}:`
|
let shortcodeWithColons = `:${shortcode}:`
|
||||||
content = replaceAll(
|
content = replaceAll(
|
||||||
content,
|
content,
|
||||||
|
|
Loading…
Reference in a new issue