wip
This commit is contained in:
parent
9a0ac64f12
commit
21fc2595ce
|
@ -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';
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue