From 7a95e50fe7672dbb7883dc50a6bf6c7aec94f457 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 29 Sep 2026 17:50:50 +0000 Subject: [PATCH] lowercase usernames on the website The game saves usernames in lowercase, but the search box and the user/board URL parameters were used as typed, so searching "Adam" reported that the user had never played. Lowercase them before use. Co-Authored-By: Claude Opus 5.5 --- www/html/wordle/game.html | 2 +- www/html/wordle/games.html | 2 +- www/html/wordle/index.html | 3 ++- www/html/wordle/stats.html | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/www/html/wordle/game.html b/www/html/wordle/game.html index c490f53..7ae7452 100644 --- a/www/html/wordle/game.html +++ b/www/html/wordle/game.html @@ -234,7 +234,7 @@ async function fetchBoard(user, epochDay) { async function loadBoard() { const params = new URLSearchParams(location.search); - const boardName = params.get("board"); + const boardName = params.get("board")?.toLowerCase(); // game saves names in lowercase const errorBox = document.getElementById("error"); const dateEl = document.getElementById("date"); diff --git a/www/html/wordle/games.html b/www/html/wordle/games.html index bdf1ac0..c82e95b 100644 --- a/www/html/wordle/games.html +++ b/www/html/wordle/games.html @@ -148,7 +148,7 @@ function formatDateFromEpochDays(epochDays) { (async () => { const params = new URLSearchParams(location.search); - const user = params.get("user"); + const user = params.get("user")?.toLowerCase(); // game saves names in lowercase const usernameSpan = document.getElementById("username"); const gamesList = document.getElementById("games-list"); const emptyMsg = document.getElementById("empty"); diff --git a/www/html/wordle/index.html b/www/html/wordle/index.html index 01af05c..1c0ecc8 100644 --- a/www/html/wordle/index.html +++ b/www/html/wordle/index.html @@ -109,7 +109,8 @@ form.addEventListener("submit", (e) => { e.preventDefault(); - const user = input.value.trim(); + // The game saves usernames in lowercase + const user = input.value.trim().toLowerCase(); if (!user) return; window.location.href = `/stats.html?user=${encodeURIComponent(user)}`; }); diff --git a/www/html/wordle/stats.html b/www/html/wordle/stats.html index 334b29e..4c18948 100644 --- a/www/html/wordle/stats.html +++ b/www/html/wordle/stats.html @@ -117,7 +117,7 @@