feat: add cross-browser X GeoBlock extension

This commit is contained in:
Darío Sevilla committed 2026-10-15 07:22:51 +00:00
commit 0944faab3e
26 files changed
+803

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
"use strict";
const extensionApi = globalThis.browser || chrome;
extensionApi.runtime.onMessage.addListener((message, _sender, sendResponse) => {
if (message?.type !== "parse-about-html") return false;
try {
const document = new DOMParser().parseFromString(message.html, "text/html");
sendResponse(XGeoParser.parseAboutDocument(document, message.username));
} catch (error) {
sendResponse({ country: null, following: null, error: error.message });
}
return false;
});