From defa834b2ab094b92865ff96a826c69c2caeec9a Mon Sep 17 00:00:00 2001 From: Sterling Archer Date: Sat, 20 Jun 2026 23:11:17 -0700 Subject: [PATCH] Fix leaderboard friend click not working --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 58b48da..8181fcc 100644 --- a/index.html +++ b/index.html @@ -976,14 +976,13 @@ function renderLeaderboard() { return; } - const visible = entries.slice(0, lbVisibleCount); el.innerHTML = visible.map((e, i) => { const rank = i + 1; const rankClass = rank===1?'top1':rank===2?'top2':rank===3?'top3':''; const name = e.isMe ? (currentProfileData?.displayName || 'Me') : getFriendDisplayName(e.uid); const avatar = avatarHtml(e.profile, 40); return ` -
+
${rank}
${avatar}
@@ -994,6 +993,10 @@ function renderLeaderboard() {
`; }).join(''); + el.querySelectorAll('.lb-row[data-uid]').forEach(row => { + row.addEventListener('click', () => openFriendProfile(row.dataset.uid)); + }); + document.getElementById('lb-show-more').style.display = entries.length > lbVisibleCount ? 'block' : 'none'; }