summaryrefslogtreecommitdiff
path: root/packages/frontend/src/utility/get-embed-code.ts
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-03-02 16:05:12 -0500
committerFreya Murphy <freya@freyacat.org>2026-03-02 17:39:38 -0500
commit284b87dae85a356dd543a03f81d12031b11f7554 (patch)
tree5df602a3d98fbf9a8f457fab3d749707bfd89cde /packages/frontend/src/utility/get-embed-code.ts
parentmerge: Release/2025.4.5 (!1258) (diff)
downloadsharkey-284b87dae85a356dd543a03f81d12031b11f7554.tar.gz
sharkey-284b87dae85a356dd543a03f81d12031b11f7554.tar.bz2
sharkey-284b87dae85a356dd543a03f81d12031b11f7554.zip
split url into webUrl and localUrl (like mastodon)
Diffstat (limited to 'packages/frontend/src/utility/get-embed-code.ts')
-rw-r--r--packages/frontend/src/utility/get-embed-code.ts6
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');
}