merge
All checks were successful
Build / build (push) Successful in 2m11s

This commit is contained in:
2024-02-05 19:45:36 +09:00
parent 3b46993254
commit 312a2330c3
79 changed files with 2232 additions and 1347 deletions

View File

@ -14,7 +14,7 @@ document.addEventListener("nav", () => {
button.type = "button"
button.innerHTML = svgCopy
button.ariaLabel = "Copy source"
button.addEventListener("click", () => {
function onClick() {
navigator.clipboard.writeText(source).then(
() => {
button.blur()
@ -26,7 +26,9 @@ document.addEventListener("nav", () => {
},
(error) => console.error(error),
)
})
}
button.addEventListener("click", onClick)
window.addCleanup(() => button.removeEventListener("click", onClick))
els[i].prepend(button)
}
}