MCPcopy
hub / github.com/darkreader/darkreader / applyFixes

Method applyFixes

src/background/devtools.ts:129–142  ·  view source on GitHub ↗
(type: DevFixType, text: string)

Source from the content-addressed store, hash-verified

127 }
128
129 static applyFixes(type: DevFixType, text: string): Error | null {
130 try {
131 const apply = ({
132 'detector': DevTools.applyDetectorHints,
133 'dynamic': DevTools.applyDynamicThemeFixes,
134 'filter': DevTools.applyInversionFixes,
135 'static': DevTools.applyStaticThemes,
136 } as Record<DevFixType, (text: string) => any>)[type];
137 apply(text);
138 return null;
139 } catch (err: any) {
140 return err as Error;
141 }
142 }
143
144 static resetFixes(type: DevFixType): void {
145 const reset = ({

Callers

nothing calls this directly

Calls 1

applyFunction · 0.50

Tested by

no test coverage detected