summaryrefslogtreecommitdiff
path: root/packages/frontend/src/boot/common.ts
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-20 16:07:52 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-20 16:07:52 +0900
commit7f534a41a65ec93a0eafd02796b782309b3d0702 (patch)
tree56a7ba9d8fd48be173b4496db6dbd8f384dc7a81 /packages/frontend/src/boot/common.ts
parentUpdate eslint.config.js (diff)
downloadmisskey-7f534a41a65ec93a0eafd02796b782309b3d0702.tar.gz
misskey-7f534a41a65ec93a0eafd02796b782309b3d0702.tar.bz2
misskey-7f534a41a65ec93a0eafd02796b782309b3d0702.zip
fix lint
Diffstat (limited to 'packages/frontend/src/boot/common.ts')
-rw-r--r--packages/frontend/src/boot/common.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts
index 402ccca587..8096c46960 100644
--- a/packages/frontend/src/boot/common.ts
+++ b/packages/frontend/src/boot/common.ts
@@ -98,14 +98,14 @@ export async function common(createVue: () => App<Element>) {
document.addEventListener('touchend', () => {}, { passive: true });
// URLに#pswpを含む場合は取り除く
- if (location.hash === '#pswp') {
- history.replaceState(null, '', location.href.replace('#pswp', ''));
+ if (window.location.hash === '#pswp') {
+ history.replaceState(null, '', window.location.href.replace('#pswp', ''));
}
// 一斉リロード
reloadChannel.addEventListener('message', path => {
- if (path !== null) location.href = path;
- else location.reload();
+ if (path !== null) window.location.href = path;
+ else window.location.reload();
});
// If mobile, insert the viewport meta tag
@@ -130,11 +130,11 @@ export async function common(createVue: () => App<Element>) {
});
//#region loginId
- const params = new URLSearchParams(location.search);
+ const params = new URLSearchParams(window.location.search);
const loginId = params.get('loginId');
if (loginId) {
- const target = getUrlWithoutLoginId(location.href);
+ const target = getUrlWithoutLoginId(window.location.href);
if (!$i || $i.id !== loginId) {
const account = await getAccountFromId(loginId);