From d90f84d24ff1e38103bdcb3bb7414473010e2073 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:18:48 +0900 Subject: [PATCH] provide --- packages/frontend/src/ui/embed.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/ui/embed.vue b/packages/frontend/src/ui/embed.vue index 36e68714c0..c7d44a67bb 100644 --- a/packages/frontend/src/ui/embed.vue +++ b/packages/frontend/src/ui/embed.vue @@ -51,13 +51,15 @@ provideMetadataReceiver((metadataGetter) => { provideReactiveMetadata(pageMetadata); //#region Embed Link Behavior - -// 強制的に新しいタブで開く +//強制的に新しいタブで開く mainRouter.navHook = (path, flag): boolean => { window.open(path, '_blank', 'noopener'); return true; }; +//#endregion +//#region Embed Provide +provide('EMBED_PAGE', true); //#endregion //#region Embed Style @@ -74,7 +76,7 @@ let resizeMessageThrottleFlag = false; let previousHeight = 0; const resizeObserver = new ResizeObserver(async () => { const height = rootEl.value!.scrollHeight + 2; // border 上下1px - if (resizeMessageThrottleFlag && Math.abs(previousHeight - height) < 30) return; + if (resizeMessageThrottleFlag && Math.abs(previousHeight - height) < 30) return; // プラマイ30px未満の変化は無視 if (resizeMessageThrottleTimer) window.clearTimeout(resizeMessageThrottleTimer); postMessageToParentWindow('misskey:embed:changeHeight', {