From 48df08bd3162eb4adcf73c5104b09adc0b80c6e3 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 31 Jan 2018 18:22:47 -0800 Subject: [PATCH] implement autoplay gifs for custom emoji --- routes/_components/status/Status.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/_components/status/Status.html b/routes/_components/status/Status.html index 8450cbd7..d5233b37 100644 --- a/routes/_components/status/Status.html +++ b/routes/_components/status/Status.html @@ -349,12 +349,13 @@ originalAccount: (originalStatus) => originalStatus.account, originalMediaAttachments: (originalStatus) => originalStatus.media_attachments, statusId: (originalStatus) => originalStatus.id, - emojifiedContent: (originalStatus) => { + emojifiedContent: (originalStatus, $autoplayGifs) => { let status = originalStatus let content = status.content if (status.emojis && status.emojis.length) { 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}:` content = replaceAll( content,