From 753b679b9a459716007c970060cb66d2f174da75 Mon Sep 17 00:00:00 2001 From: Codex Night Worker Date: Fri, 13 Nov 2026 12:52:29 +0900 Subject: [PATCH 1/2] AI: address issue #152 --- frontend/src/components/PostEmbed.tsx | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/frontend/src/components/PostEmbed.tsx b/frontend/src/components/PostEmbed.tsx index a8e7108..23aab50 100644 --- a/frontend/src/components/PostEmbed.tsx +++ b/frontend/src/components/PostEmbed.tsx @@ -177,6 +177,37 @@ const PostEmbed: FC = ( onError={onError}/>) } + case 'pixiv.net': + { + if (url.hostname !== 'pixiv.net' && url.hostname !== 'www.pixiv.net') + break + + const artworkId = + url.pathname === '/member_illust.php' + ? url.searchParams.get ('illust_id') + : url.pathname.match ( + /^\/(?:[a-z]{2}(?:-[A-Za-z]{2})?\/)?artworks\/(\d+)\/?$/)?.[1] + + if (!(artworkId) || !(/^\d+$/.test (artworkId))) + break + + if (embedAutoLoadMode === 'off') + return externalLink + if (shouldLoadEmbed === false) + return manualLoadControl + + const embedUrl = + `https://embed.pixiv.net/oembed_iframe.php?type=illust&id=${ artworkId }` + + return ( +