MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / setupDownloadButtons

Function setupDownloadButtons

codeclash/viewer/static/js/clipboard.js:162–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160
161// Setup download button event listeners
162function 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}

Callers 1

renderMessagesFunction · 0.85

Calls 1

downloadFileFunction · 0.85

Tested by

no test coverage detected