MCPcopy
hub / github.com/darkreader/darkreader / setupMatchObserver

Function setupMatchObserver

src/inject/detector.ts:219–226  ·  view source on GitHub ↗
(target: Element)

Source from the content-addressed store, hash-verified

217 }
218
219 function setupMatchObserver(target: Element) {
220 hintMatchObserver?.disconnect();
221 if (checkMatch(target)) {
222 return;
223 }
224 hintMatchObserver = new MutationObserver(() => checkMatch(target));
225 hintMatchObserver.observe(target, {attributes: true});
226 }
227
228 const target = document.querySelector(hint.target);
229 if (target) {

Callers 1

detectUsingHintFunction · 0.85

Calls 2

checkMatchFunction · 0.85
disconnectMethod · 0.80

Tested by

no test coverage detected