From dd16a8f4acc5da44c61016e9bc0396e7648163c7 Mon Sep 17 00:00:00 2001 From: Z Date: Sun, 29 Dec 2019 02:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E4=B8=BAhttps=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E7=9A=84=E7=9A=84=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BAiframe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mastodon/components/media_gallery.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index e8dd79af9..e9789678b 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -181,7 +181,19 @@ class Item extends React.PureComponent { const x = ((focusX / 2) + .5) * 100; const y = ((focusY / -2) + .5) * 100; - thumbnail = ( + const descrip = attachment.get('description'); + thumbnail = (descrip && descrip.startsWith('https://'))? + ( + + ) + : + (