()
| 216 | } |
| 217 | |
| 218 | function 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 | |
| 227 | function persistHostnames() { |
| 228 | writeStoredJson(SETTINGS_STORAGE_KEYS.hostnames, topWebsites); |
no test coverage detected