MCPcopy
hub / github.com/darkreader/darkreader / saveSettings

Method saveSettings

src/background/user-storage.ts:157–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 }
156
157 static async saveSettings(): Promise<void> {
158 if (!UserStorage.settings) {
159 // This path is never taken because Extension always calls UserStorage.loadSettings()
160 // before calling UserStorage.saveSettings().
161 logWarn('Could not save settings into storage because the settings are missing.');
162 return;
163 }
164 await UserStorage.saveSettingsIntoStorage();
165 }
166
167 static async saveSyncSetting(sync: boolean): Promise<void> {
168 const obj = {syncSettings: sync};

Callers 1

saveUserSettingsMethod · 0.80

Calls 1

logWarnFunction · 0.90

Tested by

no test coverage detected