MCPcopy Create free account
hub / github.com/massCodeIO/massCode / onCopy

Function onCopy

src/renderer/composables/useCopyTracker.ts:16–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getActiveSpaceIdFunction · 0.90
incrementCopyFunction · 0.85

Tested by

no test coverage detected