()
| 1 | // Trajectory on-demand loading functionality for CodeClash Trajectory Viewer |
| 2 | |
| 3 | function setupTrajectoryLoading() { |
| 4 | // Handle load trajectory button clicks |
| 5 | document.addEventListener("click", function (e) { |
| 6 | if (e.target.closest(".load-trajectory-btn")) { |
| 7 | const button = e.target.closest(".load-trajectory-btn"); |
| 8 | const playerName = button.dataset.player; |
| 9 | const roundNum = button.dataset.round; |
| 10 | |
| 11 | loadTrajectoryDetails(playerName, roundNum); |
| 12 | } |
| 13 | }); |
| 14 | } |
| 15 | |
| 16 | function loadTrajectoryDetails(playerName, roundNum) { |
| 17 | // Get the folder from URL params |
nothing calls this directly
no test coverage detected