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 params = new URLSearchParams(location.search);
const embedParams = parseEmbedParams(params); const embedParams = parseEmbedParams(params);
console.info(embedParams);
// サイズの制限 // サイズの制限
document.documentElement.style.maxWidth = '500px'; 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 { postMessageToParentWindow } from '@/post-message.js';
import { defaultEmbedParams } from '@/embed-page.js'; import { defaultEmbedParams } from '@/embed-page.js';
const page = location.href.split('/')[1];
console.log(page);
const embedParams = inject<ParsedEmbedParams>('embedParams', defaultEmbedParams); const embedParams = inject<ParsedEmbedParams>('embedParams', defaultEmbedParams);
//#region Embed Style //#region Embed Style

View File

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