From 9152adfc467e524cfc9e5297db5f0e4c40cf1f11 Mon Sep 17 00:00:00 2001 From: itsaygea Date: Sat, 24 Jan 2026 08:53:29 -0700 Subject: [PATCH] Make team suggestions clickable - Added addToTeamFromSuggestion function - Clicking a suggestion now adds it to your team (up to 4 operators) - Visual feedback with cursor pointer and + indicator --- js/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 62795aa..777a909 100644 --- a/js/main.js +++ b/js/main.js @@ -556,6 +556,13 @@ updateTeamUI(); } + function addToTeamFromSuggestion(id) { + if (!selectedTeam.includes(id) && selectedTeam.length < 4) { + selectedTeam.push(id); + updateTeamUI(); + } + } + function updateTeamUI() { // Update operator selection document.querySelectorAll('.select-option').forEach(el => { @@ -624,12 +631,13 @@ ` : '
?
'; return ` -
+
${imgHtml}
${op ? op.name.toUpperCase() : id} ${op && op.free ? 'FREE' : ''}

${reason}

+
+
`; }).join('');