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

Function copyFromModal

codeclash/viewer/static/js/picker.js:529–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

527}
528
529function copyFromModal() {
530 const textarea = document.getElementById("bulk-actions-textarea");
531 const text = textarea.value;
532
533 if (text) {
534 copyToClipboard(text)
535 .then(() => {
536 const btn = document.getElementById("modal-copy-btn");
537 const originalHtml = btn.innerHTML;
538 btn.classList.add("copied");
539 btn.innerHTML = '<i class="bi bi-check-lg"></i> Copied!';
540
541 setTimeout(() => {
542 btn.classList.remove("copied");
543 btn.innerHTML = originalHtml;
544 }, 2000);
545 })
546 .catch((err) => {
547 console.error("Failed to copy:", err);
548 });
549 }
550}
551
552// Close modal and dropdowns on Escape key
553document.addEventListener("keydown", function (event) {

Callers

nothing calls this directly

Calls 1

copyToClipboardFunction · 0.70

Tested by

no test coverage detected