diff --git a/public/results.css b/public/results.css index 7f71573..d33f3ee 100644 --- a/public/results.css +++ b/public/results.css @@ -105,8 +105,3 @@ span > p { padding: 0; font-size: medium; } - -.disable-dbl-tap-zoom { - touch-action: manipulation; -} - diff --git a/public/results.html b/public/results.html index cc3afe1..5c6cfeb 100644 --- a/public/results.html +++ b/public/results.html @@ -33,8 +33,8 @@

diff --git a/src/results.ts b/src/results.ts index 4e90283..d1fe6e6 100644 --- a/src/results.ts +++ b/src/results.ts @@ -23,6 +23,12 @@ let showAllWords: boolean; setInterval(checkForUpdatedSession, CHECK_UPDATE_INTERVAL_MS); +document.querySelectorAll(".disable-double-tap-zoom").forEach((e) => { + e.addEventListener("touchstart", (event) => { + event.preventDefault(); + }); +}); + document.getElementById("left-button")?.addEventListener("pointerdown", () => { if (otherPlayerIdx <= 0) { console.warn("Somehow tried to reduce below first player"); @@ -97,12 +103,12 @@ async function init() { // descending score order, else ascending alphabetical order sortedBoardWords = session.board.words.sort((a, b) => - a.length !== b.length ? b.length - a.length : a.localeCompare(b) + a.length !== b.length ? b.length - a.length : a.localeCompare(b), ); wordsFoundByPlayers = new Set( Object.values(session.scoredUsers) .map((scoredUser) => scoredUser.words) - .flat() + .flat(), ); console.log(`sorted words: ${sortedBoardWords} found words:`); @@ -121,7 +127,7 @@ async function init() { if (mainPlayer.done && mainPlayer.score) { scoreText = mainPlayer.score.toString(); } else if (!mainPlayer.done && mainPlayer.score) { - scoreText = `${mainPlayer.score.toString()}...` + scoreText = `${mainPlayer.score.toString()}...`; } else if (mainPlayer.done && !mainPlayer.score) { console.warn(`Player ${mainPlayer.name} was marked as done but score was null`); } @@ -167,7 +173,7 @@ function updateOtherPlayerColumn() { if (otherPlayer.done && otherPlayer.score) { scoreText = otherPlayer.score.toString(); } else if (!otherPlayer.done && otherPlayer.score) { - scoreText = `${otherPlayer.score.toString()}...` + scoreText = `${otherPlayer.score.toString()}...`; } else if (otherPlayer.done && !otherPlayer.score) { console.warn(`Player ${otherPlayer.name} was marked as done but score was null`); }