From 7ad615163786695c13d62f4ee31c01f9c4a930ce Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 4 Nov 2023 15:35:28 +0800 Subject: [PATCH] Port domain format from Trending --- src/components/status.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 105d380..211beff 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -1714,7 +1714,9 @@ function Card({ card, instance }) { if (snapStates.unfurledLinks[url]) return null; if (hasText && (image || (type === 'photo' && blurhash))) { - const domain = new URL(url).hostname.replace(/^www\./, ''); + const domain = new URL(url).hostname + .replace(/^www\./, '') + .replace(/\/$/, ''); let blurhashImage; if (!image) { const w = 44;