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'; }