We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1639c49 commit c8a255dCopy full SHA for c8a255d
1 file changed
script.js
@@ -1015,7 +1015,16 @@ function handleGenerateUserIds() {
1015
1016
const btn = document.createElement("button");
1017
btn.textContent = "Copy";
1018
- btn.addEventListener("click", () => copyToClipboard(id));
+ btn.addEventListener("click", async () => {
1019
+ const ok = await copyToClipboard(id);
1020
+ const prev = btn.textContent;
1021
+ btn.textContent = ok ? "Copied!" : "Copy failed";
1022
+ btn.disabled = true;
1023
+ setTimeout(() => {
1024
+ btn.textContent = prev;
1025
+ btn.disabled = false;
1026
+ }, 1500);
1027
+ });
1028
1029
row.appendChild(span);
1030
row.appendChild(btn);
0 commit comments