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

Function watchBodyChange

scripts/backup/m38u_detector.js:764–780  ·  view source on GitHub ↗
(onchange)

Source from the content-addressed store, hash-verified

762 }
763
764 function watchBodyChange(onchange) {
765 let timeout;
766 let observer = new MutationObserver(() => {
767 if (!timeout) {
768 timeout = setTimeout(() => {
769 timeout = null;
770 onchange();
771 }, 200);
772 }
773 });
774 observer.observe(document.documentElement, {
775 childList: true,
776 subtree: true,
777 attributes: true,
778 characterData: true,
779 });
780 }
781
782 function getAllTextNodes(parent) {
783 var re = [];

Callers 1

m38u_detector.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected