add appropriate attributes to embed html

This commit is contained in:
kakkokari-gtyih 2024-08-20 13:22:25 +09:00
parent 83e3708488
commit 60f9cc3c9f

View file

@ -52,7 +52,7 @@ export function getEmbedCode(path: string, params?: EmbedParams): string {
}
const iframeCode = [
`<iframe src="${url + path + paramString}" data-misskey-embed-id="${iframeId}" style="border: none; width: 100%; max-width: 500px; height: 300px; color-scheme: light dark;"></iframe>`,
`<iframe src="${url + path + paramString}" data-misskey-embed-id="${iframeId}" loading="lazy" referrerpolicy="strict-origin-when-cross-origin" style="border: none; width: 100%; max-width: 500px; height: 300px; color-scheme: light dark;"></iframe>`,
`<script defer src="${url}/embed.js"></script>`,
];
return iframeCode.join('\n');