From d2445be155350da94b037f34ac3f753f08b6c1a3 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Thu, 31 May 2018 03:07:51 +0200 Subject: [PATCH] Fix missing GIF previews in tweet screenshots --- Resources/Scripts/code.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index 62452dc0..3cb34f4a 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -707,6 +707,12 @@ } } + let gif = html.find(".js-media-gif-container"); + + if (gif.length){ + gif.css("background-image", 'url("'+chirp.getMedia()[0].small()+'")'); + } + let type = chirp.getChirpType(); if ((type.startsWith("favorite") || type.startsWith("retweet")) && chirp.isAboutYou()){