summaryrefslogtreecommitdiff
path: root/packages/frontend/src/boot
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
parentUpdate eslint.config.js (diff)
downloadsharkey-7f534a41a65ec93a0eafd02796b782309b3d0702.tar.gz
sharkey-7f534a41a65ec93a0eafd02796b782309b3d0702.tar.bz2
sharkey-7f534a41a65ec93a0eafd02796b782309b3d0702.zip
fix lint
Diffstat (limited to 'packages/frontend/src/boot')
-rw-r--r--packages/frontend/src/boot/common.ts12
-rw-r--r--packages/frontend/src/boot/main-boot.ts8
2 files changed, 10 insertions, 10 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);
diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts
index 62ee0c5d72..f7360a7340 100644
--- a/packages/frontend/src/boot/main-boot.ts
+++ b/packages/frontend/src/boot/main-boot.ts
@@ -43,7 +43,7 @@ export async function mainBoot() {
if (!$i) uiStyle = 'visitor';
if (searchParams.has('zen')) uiStyle = 'zen';
- if (uiStyle === 'deck' && prefer.s['deck.useSimpleUiForNonRootPages'] && location.pathname !== '/') uiStyle = 'zen';
+ if (uiStyle === 'deck' && prefer.s['deck.useSimpleUiForNonRootPages'] && window.location.pathname !== '/') uiStyle = 'zen';
if (searchParams.has('ui')) uiStyle = searchParams.get('ui');
@@ -216,7 +216,7 @@ export async function mainBoot() {
let reloadDialogShowing = false;
stream.on('_disconnected_', async () => {
if (prefer.s.serverDisconnectedBehavior === 'reload') {
- location.reload();
+ window.location.reload();
} else if (prefer.s.serverDisconnectedBehavior === 'dialog') {
if (reloadDialogShowing) return;
reloadDialogShowing = true;
@@ -227,7 +227,7 @@ export async function mainBoot() {
});
reloadDialogShowing = false;
if (!canceled) {
- location.reload();
+ window.location.reload();
}
}
});
@@ -458,7 +458,7 @@ export async function mainBoot() {
const latestDonationInfoShownAt = miLocalStorage.getItem('latestDonationInfoShownAt');
const neverShowDonationInfo = miLocalStorage.getItem('neverShowDonationInfo');
- if (neverShowDonationInfo !== 'true' && (createdAt.getTime() < (Date.now() - (1000 * 60 * 60 * 24 * 3))) && !location.pathname.startsWith('/miauth')) {
+ if (neverShowDonationInfo !== 'true' && (createdAt.getTime() < (Date.now() - (1000 * 60 * 60 * 24 * 3))) && !window.location.pathname.startsWith('/miauth')) {
if (latestDonationInfoShownAt == null || (new Date(latestDonationInfoShownAt).getTime() < (Date.now() - (1000 * 60 * 60 * 24 * 30)))) {
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkDonation.vue')), {}, {
closed: () => dispose(),