diff --git a/app.js b/app.js index 1430a30..204c76f 100644 --- a/app.js +++ b/app.js @@ -30,36 +30,20 @@ for (const button of copyButtons) { const value = source?.textContent.trim() || button.dataset.copy; const copyLabel = button.dataset.copyLabel ?? "Command"; const status = button.closest(".terminal-shell")?.querySelector(".copy-status"); - const revealTarget = button.dataset.revealTarget - ? document.getElementById(button.dataset.revealTarget) - : null; - - if (revealTarget) { - revealTarget.hidden = false; - button.setAttribute("aria-expanded", "true"); - } try { if (!value) throw new Error("No copyable content was found."); await copyText(value); - if (status) { - status.textContent = revealTarget - ? `${copyLabel} copied. The complete prompt is shown below.` - : `${copyLabel} copied to clipboard.`; - } + if (status) status.textContent = `${copyLabel} copied to clipboard.`; const label = button.querySelector("b") ?? button; const original = label.textContent; - label.textContent = revealTarget ? "Copied + shown" : "Copied"; + label.textContent = "Copied"; window.setTimeout(() => { label.textContent = original; if (status) status.textContent = ""; }, 1800); } catch { - if (status) { - status.textContent = revealTarget - ? "The complete prompt is shown below. Select it and copy it manually." - : "Copy failed. Select the command manually."; - } + if (status) status.textContent = "Copy failed. Select the complete prompt above and copy it manually."; } }); } diff --git a/index.html b/index.html index ab03347..d0212d2 100644 --- a/index.html +++ b/index.html @@ -274,24 +274,19 @@ AGENT INSTALL DRY RUN → INSTALL → VERIFY - -

- -