This commit is contained in:
Leandro Facchinetti 2021-03-11 11:19:50 +00:00
parent c2034b0a6b
commit 002be23176
2 changed files with 0 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,11 +0,0 @@
for (const copyable of document.querySelectorAll(".copyable"))
copyable.insertAdjacentHTML(
"afterend",
`<br><button class="copy-button" data-clipboard-text="${copyable.innerText}">Copy</button>`
);
new ClipboardJS(".copy-button").on("success", (event) => {
event.trigger.innerText = "Copied";
window.setTimeout(() => {
event.trigger.innerText = "Copy";
}, 500);
});