Add code copy button
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Isaac Mills 2024-04-23 08:20:26 -04:00
parent 47b613cf43
commit 437fab1fe0
Signed by: fnmain
GPG key ID: B67D7410F33A0F61

View file

@ -11,8 +11,8 @@ blocks.forEach((block) => {
button.innerText = copyButtonLabel; button.innerText = copyButtonLabel;
block.appendChild(button); block.appendChild(button);
button.addEventListener("click", async () => { button.addEventListener("click", async (event) => {
await copyCode(block); await copyCode(block, event.target);
}); });
} }
}); });