This commit is contained in:
syuilo 2024-08-27 08:24:34 +09:00
parent 9a0ac64f12
commit 21fc2595ce
3 changed files with 9 additions and 1 deletions

View file

@ -16,6 +16,8 @@ console.info('Misskey Embed');
const params = new URLSearchParams(location.search);
const embedParams = parseEmbedParams(params);
console.info(embedParams);
// サイズの制限
document.documentElement.style.maxWidth = '500px';

View file

@ -29,6 +29,9 @@ import type { ParsedEmbedParams } from '@/embed-page.js';
import { postMessageToParentWindow } from '@/post-message.js';
import { defaultEmbedParams } from '@/embed-page.js';
const page = location.href.split('/')[1];
console.log(page);
const embedParams = inject<ParsedEmbedParams>('embedParams', defaultEmbedParams);
//#region Embed Style

View file

@ -53,7 +53,10 @@ const devConfig: UserConfig = {
'/favicon.ico': httpUrl,
'/robots.txt': httpUrl,
'/embed.js': httpUrl,
'/embed': embedUrl,
'/embed': {
target: embedUrl,
ws: true,
},
'/identicon': {
target: httpUrl,
rewrite(path) {