diff --git a/src/lib/HeardleGame.svelte b/src/lib/HeardleGame.svelte index ffe8d07..cb484b1 100644 --- a/src/lib/HeardleGame.svelte +++ b/src/lib/HeardleGame.svelte @@ -18,7 +18,7 @@ const COLORS = { background: '#ffffff', - text: '#050315', + text: '#121212', primary: '#83D4FD', secondary: '#F484C1', accent: '#F0440E' @@ -245,14 +245,12 @@ if (!gameOver) { snippetTimeout = setTimeout(() => { widget.pause(); - // snap exactly to the end of this snippet currentPosition = segmentDurations[attemptCount]; }, segmentDurations[attemptCount]); } }); widget.bind(SC.Widget.Events.PAUSE, stopAllTimers); widget.bind(SC.Widget.Events.FINISH, () => { - // ensure we hit the very end currentPosition = gameOver ? fullDuration : segmentDurations[attemptCount]; stopAllTimers(); }); @@ -309,7 +307,6 @@ if (selectedTrack.title.toLowerCase() === ans) { attemptInfos = [...attemptInfos, { status: 'correct', title: currentTrack.title }]; gameOver = true; - // include try count in winning message message = `✅ Correct! It was “${currentTrack.title}.” You got it in ${attemptCount} ${attemptCount === 1 ? 'try' : 'tries'}.`; widget.pause(); } else { @@ -343,10 +340,9 @@ userInput = s.title; suggestions = []; inputEl.blur(); - window.scrollTo({ top: 0, behavior: 'smooth' }); } - // update suggestions reactively, but hide once a track is selected + // update suggestions reactively, hide once a track is selected $: suggestions = userInput && !selectedTrack ? tracks.filter((t) => t.title.toLowerCase().includes(userInput.toLowerCase())).slice(0, 5) @@ -427,9 +423,10 @@ Heardle – {ARTIST_NAME} +