Skip to content

Commit

Permalink
now fix btn copied text
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianogtl committed Jun 12, 2024
1 parent 47e5504 commit f7660a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ function addClipboardEvent(clipboardBtn, preTagContent) {
clipboardBtn.onclick = () => {
navigator.clipboard.writeText(preTagContent);
set;
clipboardBtn.innerText = "Copied!";
setTimeout(() => {
clipboardBtn.innerText = "Copy";
clipboardBtn.innerText = "Copied!";
}, 3000);
clipboardBtn.innerText = "Copy";
};
}

Expand Down

0 comments on commit f7660a0

Please sign in to comment.