MCPcopy Create free account
hub / github.com/BrainicHQ/DoHSpeedTest / loadStoredDoHServers

Function loadStoredDoHServers

script.js:218–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216}
217
218function loadStoredDoHServers() {
219 const stored = readStoredJson(SETTINGS_STORAGE_KEYS.dohServers);
220 if (!Array.isArray(stored)) return cloneDefaultDoHServers();
221
222 const servers = dedupeDoHServers(stored.map(normalizeDoHServerForStorage).filter(Boolean));
223 if (stored.length > 0 && servers.length === 0) return cloneDefaultDoHServers();
224 return servers;
225}
226
227function persistHostnames() {
228 writeStoredJson(SETTINGS_STORAGE_KEYS.hostnames, topWebsites);

Callers 1

script.jsFile · 0.85

Calls 3

readStoredJsonFunction · 0.85
cloneDefaultDoHServersFunction · 0.85
dedupeDoHServersFunction · 0.85

Tested by

no test coverage detected