diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-03-02 16:05:12 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-03-02 18:39:22 -0500 |
| commit | 24734d408700a72d45c3ff4a679606cab3ec544f (patch) | |
| tree | d0fee0bcf508f3c631f7c26724bb5cd94dfc88a0 /packages/frontend/src/utility/get-embed-code.ts | |
| parent | merge: Release/2025.4.5 (!1258) (diff) | |
| download | sharkey-stable.tar.gz sharkey-stable.tar.bz2 sharkey-stable.zip | |
split url into webUrl and localUrl (like mastodon)stable
Diffstat (limited to '')
| -rw-r--r-- | packages/frontend/src/utility/get-embed-code.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/utility/get-embed-code.ts b/packages/frontend/src/utility/get-embed-code.ts index d458e64f19..c4741d73f5 100644 --- a/packages/frontend/src/utility/get-embed-code.ts +++ b/packages/frontend/src/utility/get-embed-code.ts @@ -4,7 +4,7 @@ */ import { defineAsyncComponent } from 'vue'; import { v4 as uuid } from 'uuid'; -import { url } from '@@/js/config.js'; +import { webUrl } from '@@/js/config.js'; import { defaultEmbedParams, embedRouteWithScrollbar } from '@@/js/embed-page.js'; import type { EmbedParams, EmbeddableEntity } from '@@/js/embed-page.js'; import * as os from '@/os.js'; @@ -53,8 +53,8 @@ export function getEmbedCode(path: string, params?: EmbedParams): string { } const iframeCode = [ - `<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>`, + `<iframe src="${webUrl + 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="${webUrl}/embed.js"></script>`, ]; return iframeCode.join('\n'); } |