diff --git a/js/main.js b/js/main.js index 777a909..3f1e3db 100644 --- a/js/main.js +++ b/js/main.js @@ -551,17 +551,19 @@ updateTeamUI(); } - function clearTeam() { + // Make function global for onclick handler + window.clearTeam = function() { selectedTeam = []; updateTeamUI(); - } + }; - function addToTeamFromSuggestion(id) { + // Make function global for onclick handler + window.addToTeamFromSuggestion = function(id) { if (!selectedTeam.includes(id) && selectedTeam.length < 4) { selectedTeam.push(id); updateTeamUI(); } - } + }; function updateTeamUI() { // Update operator selection @@ -658,8 +660,8 @@ // Initialize initOperatorSelect(); - // Builds Modal Functions - function showTeamBuilds() { + // Builds Modal Functions - global for onclick + window.showTeamBuilds = function() { if (selectedTeam.length === 0) { alert('Please select at least one operator first!'); return; @@ -722,7 +724,7 @@ document.body.style.overflow = 'hidden'; } - function closeBuildsModal() { + window.closeBuildsModal = function() { const modal = document.getElementById('buildsModal'); modal.classList.remove('active'); document.body.style.overflow = '';