MCPcopy
hub / github.com/streetwriters/notesnook / cleanup

Function cleanup

packages/clipper/src/index.ts:449–464  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

447}
448
449function cleanup() {
450 setTimeout(() => {
451 document.querySelectorAll(`.${CLASSES.nodeSelected}`).forEach((node) => {
452 if (node instanceof HTMLElement) {
453 node.classList.remove(CLASSES.nodeSelected);
454 }
455 });
456
457 document
458 .querySelectorAll(`.${CLASSES.nodeSelectionContainer}`)
459 .forEach((node) => node.remove());
460
461 removeHoverListeners(document);
462 removeClickHandlers(document);
463 }, 0);
464}
465
466async function getPage(
467 document: Document,

Callers 3

clipFunction · 0.90
enterNodeSelectionModeFunction · 0.70

Calls 5

removeHoverListenersFunction · 0.85
removeClickHandlersFunction · 0.85
removeMethod · 0.65
forEachMethod · 0.45
querySelectorAllMethod · 0.45

Tested by

no test coverage detected