MCPcopy Create free account
hub / github.com/zxlie/FeHelper / syncAutoDarkModeFromStorage

Function syncAutoDarkModeFromStorage

apps/static/js/dark-mode.js:209–225  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

207 }
208
209 function syncAutoDarkModeFromStorage(options) {
210 options = options || {};
211 let enabled = syncAutoDarkMode(options);
212
213 readChromeStorageSettings(settings => {
214 if (!settings) {
215 return;
216 }
217
218 syncAutoDarkMode(Object.assign({}, options, {
219 settings,
220 force: options.force || enabled !== getAutoDarkModeState(settings)
221 }));
222 });
223
224 return enabled;
225 }
226
227 function ensureAutoDarkModeWatcher(options) {
228 if (mediaQueryHandler) {

Callers 3

watchAutoDarkModeFunction · 0.85
turnLightAutoFunction · 0.85

Calls 3

syncAutoDarkModeFunction · 0.85
getAutoDarkModeStateFunction · 0.85

Tested by

no test coverage detected