This commit is contained in:
parent
c2034b0a6b
commit
002be23176
File diff suppressed because one or more lines are too long
|
@ -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);
|
|
||||||
});
|
|
Loading…
Reference in New Issue