From c13f8277270423f40f343658668a53b3daca51d9 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 20 Oct 2024 18:25:46 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=80=8C=E5=8D=98?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E3=83=A9=E3=83=83=E3=82=AD=E3=83=BC=E3=80=8D?= =?UTF-8?q?=E3=81=AE=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/boot/main-boot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 76459ab330..36ed925182 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -232,7 +232,7 @@ export async function mainBoot() { if (!claimedAchievements.includes('justPlainLucky')) { window.setInterval(() => { - if (Math.floor(Math.random() * 20000) === 0) { + if (document.visibilityState === 'visible' && Math.floor(Math.random() * 20000) === 0) { claimAchievement('justPlainLucky'); } }, 1000 * 10);