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

Function injectProxyAndCleanup

src/inject/dynamic-theme/mv3-proxy.ts:13–17  ·  view source on GitHub ↗
(args: {enableStyleSheetsProxy: boolean; enableCustomElementRegistryProxy: boolean})

Source from the content-addressed store, hash-verified

11const registeredScriptPath = !document.currentScript;
12
13function injectProxyAndCleanup(args: {enableStyleSheetsProxy: boolean; enableCustomElementRegistryProxy: boolean}) {
14 injectProxy(args.enableStyleSheetsProxy, args.enableCustomElementRegistryProxy);
15 doneReceiver();
16 document.dispatchEvent(new CustomEvent(EVENT_DONE));
17}
18
19function regularPath() {
20 const argString = document.currentScript!.dataset.arg;

Callers 2

regularPathFunction · 0.85
dataReceiverFunction · 0.85

Calls 2

injectProxyFunction · 0.90
doneReceiverFunction · 0.85

Tested by

no test coverage detected