1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-27 07:14:39 +02:00
This commit is contained in:
syuilo
2025-08-26 09:39:23 +09:00
parent 9e5c8d94bf
commit dbb6c71c5c
8 changed files with 51 additions and 35 deletions

View File

@@ -20,8 +20,8 @@ export function popout(path: string, w?: HTMLElement) {
} else {
const width = 400;
const height = 500;
const x = window.top.outerHeight / 2 + window.top.screenY - (height / 2);
const y = window.top.outerWidth / 2 + window.top.screenX - (width / 2);
const x = window.top == null ? 0 : window.top.outerHeight / 2 + window.top.screenY - (height / 2);
const y = window.top == null ? 0 : window.top.outerWidth / 2 + window.top.screenX - (width / 2);
window.open(url, url,
`width=${width}, height=${height}, top=${x}, left=${y}`);
}