From b64101ee6442b320be5927e7475fd3c840e5090a Mon Sep 17 00:00:00 2001 From: Echo Date: Thu, 4 Dec 2025 17:27:20 +0100 Subject: [PATCH] [Glitch] Fixes YouTube embeds Port 9bc9ebc59ef534a9987c9d6dc5450e322ffc1741 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/status/components/card.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/status/components/card.jsx b/app/javascript/flavours/glitch/features/status/components/card.jsx index cdef340ceb..6405d7ff15 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.jsx +++ b/app/javascript/flavours/glitch/features/status/components/card.jsx @@ -37,7 +37,10 @@ const handleIframeUrl = (html, url, providerName) => { iframeUrl.searchParams.set('autoplay', 1) iframeUrl.searchParams.set('auto_play', 1) - if (startTime && providerName === "YouTube") iframeUrl.searchParams.set('start', startTime) + if (providerName === 'YouTube') { + iframeUrl.searchParams.set('start', startTime || ''); + iframe.referrerPolicy = 'strict-origin-when-cross-origin'; + } iframe.src = iframeUrl.href