diff --git a/src/pages/status.jsx b/src/pages/status.jsx index 01585a54..ce475ce0 100644 --- a/src/pages/status.jsx +++ b/src/pages/status.jsx @@ -984,6 +984,18 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) { [statuses, limit, renderStatus], ); + // If there's spoiler in hero status, auto-expand it + useEffect(() => { + let timer = setTimeout(() => { + if (!heroStatusRef.current) return; + const spoilerButton = heroStatusRef.current.querySelector( + '.spoiler-button:not(.spoiling), .spoiler-media-button:not(.spoiling)', + ); + if (spoilerButton) spoilerButton.click(); + }, 1000); + return () => clearTimeout(timer); + }, [id]); + return (