MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / cleanup

Function cleanup

scripts/smoothScroll.js:272–277  ·  view source on GitHub ↗

* Removes event listeners and other traces left on the page.

()

Source from the content-addressed store, hash-verified

270 * Removes event listeners and other traces left on the page.
271 */
272 function cleanup() {
273 observer && observer.disconnect();
274 removeEvent(wheelEvent, wheel);
275 removeEvent("mousedown", mousedown);
276 removeEvent("keydown", keydown);
277 }
278 /**
279 * Make sure we are the last listener on the page so special
280 * key event handlers (e.g for <video>) can come before us

Callers 2

initTestFunction · 0.85
enableSmoothScrollFunction · 0.85

Calls 1

removeEventFunction · 0.85

Tested by

no test coverage detected