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

Function createThemeAndWatchForUpdates

src/inject/dynamic-theme/index.ts:456–466  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

454}
455
456function createThemeAndWatchForUpdates() {
457 createStaticStyleOverrides();
458
459 if (!documentIsVisible() && !theme!.immediateModify) {
460 setDocumentVisibilityListener(runDynamicStyle);
461 } else {
462 runDynamicStyle();
463 }
464
465 changeMetaThemeColorWhenAvailable(theme!);
466}
467
468function unwrap<T>(value: T): T {
469 return (value as any)?.wrappedJSObject ?? value;

Callers 1

successFunction · 0.85

Calls 5

documentIsVisibleFunction · 0.90
runDynamicStyleFunction · 0.85

Tested by

no test coverage detected