()
| 14 | const { incrementCopy } = useDonations() |
| 15 | |
| 16 | function onCopy() { |
| 17 | const now = Date.now() |
| 18 | if (now - lastCopyAt < DEDUP_MS) { |
| 19 | return |
| 20 | } |
| 21 | lastCopyAt = now |
| 22 | |
| 23 | const space = getActiveSpaceId() |
| 24 | if (!space) { |
| 25 | return |
| 26 | } |
| 27 | |
| 28 | incrementCopy(space) |
| 29 | } |
| 30 | |
| 31 | document.addEventListener('copy', onCopy) |
| 32 | listenerAttached = true |
nothing calls this directly
no test coverage detected