MCPcopy Index your code
hub / github.com/darkreader/darkreader / dataReceiver

Function dataReceiver

src/inject/dynamic-theme/mv3-proxy.ts:29–38  ·  view source on GitHub ↗
(e: any)

Source from the content-addressed store, hash-verified

27}
28
29function dataReceiver(e: any) {
30 document.removeEventListener(EVENT_ARG, dataReceiver);
31 if (document.documentElement.dataset[key] !== undefined) {
32 logInfo(`MV3 proxy injector: ${registeredScriptPath ? 'registered' : 'dedicated'} path exits because everything is done.`);
33 return;
34 }
35 document.documentElement.dataset[key] = 'true';
36 logInfo(`MV3 proxy injector: ${registeredScriptPath ? 'registered' : 'dedicated'} path runs injectProxy(${e.detail}).`);
37 injectProxyAndCleanup(e.detail);
38}
39
40function doneReceiver() {
41 document.removeEventListener(EVENT_ARG, dataReceiver);

Callers

nothing calls this directly

Calls 2

logInfoFunction · 0.90
injectProxyAndCleanupFunction · 0.85

Tested by

no test coverage detected