MCPcopy Create free account
hub / github.com/Freedium-cfd/web / initializeCodeCopyButtons

Function initializeCodeCopyButtons

new-web/src/lib/codeCopy.ts:1–5  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1export function initializeCodeCopyButtons(): void {
2 document.querySelectorAll<HTMLElement>(".code-copy-btn").forEach((button) => {
3 button.addEventListener("click", handleCodeCopy);
4 });
5}
6
7function handleCodeCopy(event: Event): void {
8 const button = event.currentTarget as HTMLElement;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected