From 9aaf266107802bb45bf736a432a0106e205a8470 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 13 Apr 2024 22:22:46 +0000 Subject: [PATCH] make gravity easter egg easier --- src/routes/(main)/+layout.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/(main)/+layout.svelte b/src/routes/(main)/+layout.svelte index e07a40c..950fc16 100644 --- a/src/routes/(main)/+layout.svelte +++ b/src/routes/(main)/+layout.svelte @@ -28,9 +28,9 @@ let stopGravity: (() => void) | null = null async function onPathChange() { - // if we switched paths more than 10 times in the past 5 seconds, import $lib/gravity.js + // if we switched paths more than 10 times in the past 10 seconds, import $lib/gravity.js pathChangeTimestamps.push(Date.now()) - while (pathChangeTimestamps[0] < Date.now() - 5000) pathChangeTimestamps.shift() + while (pathChangeTimestamps[0] < Date.now() - 10000) pathChangeTimestamps.shift() console.log(pathChangeTimestamps) if (pathChangeTimestamps.length >= 10) { const { initGravity } = await import('$lib/gravity')