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

Method load

src/background/config-manager.ts:174–190  ·  view source on GitHub ↗
(config?: LocalConfig)

Source from the content-addressed store, hash-verified

172 }
173
174 static async load(config?: LocalConfig): Promise<void> {
175 if (!config) {
176 await UserStorage.loadSettings();
177 config = {
178 local: !UserStorage.settings.syncSitesFixes,
179 };
180 }
181
182 await Promise.all([
183 ConfigManager.loadColorSchemes(config),
184 ConfigManager.loadDarkSites(config),
185 ConfigManager.loadDetectorHints(config),
186 ConfigManager.loadDynamicThemeFixes(config),
187 ConfigManager.loadInversionFixes(config),
188 ConfigManager.loadStaticThemes(config),
189 ]).catch((err) => console.error('Fatality', err));
190 }
191
192 private static handleColorSchemes(): void {
193 const $config = ConfigManager.raw.colorSchemes;

Callers 5

startMethod · 0.80
getDetectorHintsTextMethod · 0.80
getInversionFixesTextMethod · 0.80
getStaticThemesTextMethod · 0.80

Calls 8

loadSettingsMethod · 0.80
allMethod · 0.80
loadColorSchemesMethod · 0.80
loadDarkSitesMethod · 0.80
loadDetectorHintsMethod · 0.80
loadDynamicThemeFixesMethod · 0.80
loadInversionFixesMethod · 0.80
loadStaticThemesMethod · 0.80

Tested by

no test coverage detected