()
| 160 | |
| 161 | // Setup download button event listeners |
| 162 | function setupDownloadButtons() { |
| 163 | // Add event listeners to all download buttons |
| 164 | document |
| 165 | .querySelectorAll(".download-btn, .download-btn-small") |
| 166 | .forEach((button) => { |
| 167 | button.addEventListener("click", function (e) { |
| 168 | e.preventDefault(); |
| 169 | e.stopPropagation(); |
| 170 | |
| 171 | const path = this.getAttribute("data-path"); |
| 172 | if (path) { |
| 173 | downloadFile(path, this); |
| 174 | } else { |
| 175 | console.error("No path found on download button:", this); |
| 176 | } |
| 177 | }); |
| 178 | }); |
| 179 | } |
no test coverage detected