feat: redesign controls and configure cloud cache

This commit is contained in:
Darío Sevilla committed 2026-10-15 09:17:13 +00:00
1 parent 070e07845c
commit e12164c312
15 files changed
+178 -78

No files matched your search

+9 -2
View File
@@ -1,12 +1,15 @@
(function (root) {
"use strict";
const CLOUD_CACHE_ENDPOINT = "https://x-geoblock-cache.dariosevilla.es";
const DEFAULT_SETTINGS = Object.freeze({
enabled: true,
blacklist: [],
skipFollowed: true,
showPlaceholder: false,
debugMode: false,
cloudCacheEndpoint: "",
cloudCacheEndpoint: CLOUD_CACHE_ENDPOINT,
contributeCloudCache: false
});
@@ -52,7 +55,11 @@
);
}
const api = { DEFAULT_SETTINGS, normalizeCountry, isBlacklisted };
function shouldBlock(country, blacklist, following, skipFollowed = true) {
return !(skipFollowed && following === true) && isBlacklisted(country, blacklist);
}
const api = { CLOUD_CACHE_ENDPOINT, DEFAULT_SETTINGS, normalizeCountry, isBlacklisted, shouldBlock };
root.XGeoConfig = api;
if (typeof module !== "undefined") module.exports = api;
})(typeof globalThis !== "undefined" ? globalThis : this);