X GeoBlock
X GeoBlock is a Manifest V3 browser extension for Chromium and Firefox. While you browse x.com, it checks each post author's public About this account page and hides posts from countries in your blacklist. Accounts you follow are always allowed.
Features
- Processes posts already on the page and posts loaded by infinite scrolling.
- Performs authenticated About-page requests in the background. If X returns only its empty application shell, the extension briefly uses an inactive tab so X can render the account data, then closes it automatically.
- Caches account results locally without expiration until you clear the cache.
- Coalesces duplicate lookups and spaces network requests to reduce load on X.
- Skips followed accounts.
- Provides a searchable country and region checklist with flags, an enable switch, and optional hidden-post placeholders.
- Stores all settings and lookup results in browser extension storage. No data is sent to third parties.
Install from source in Chromium
- Open
chrome://extensionsin Chrome, Edge, Brave, or another Chromium browser. - Enable Developer mode.
- Select Load unpacked and choose this repository directory.
- Sign in to
https://x.comand browse normally. - Open the extension settings and select the countries you want to block. No country is selected by default.
No build step or dependency installation is required.
Install from source in Firefox
- Run
npm run build. - Open
about:debugging#/runtime/this-firefox. - Select Load Temporary Add-on.
- Choose
dist/firefox/manifest.json.
The generated XPI is unsigned and is intended for temporary installation or submission to Mozilla Add-ons. Standard Firefox releases require Mozilla signing for permanent installation.
Development
The extension uses plain JavaScript, HTML, and CSS. Node.js 18 or newer is needed only for tests:
npm test
npm run check
npm run build
After editing a file, reload the extension and refresh the X tab. See Architecture, Releases, Privacy, and Contributing.
Limitations
X does not publish a stable API for the country shown on the About page. The extension parses X's HTML and embedded page data, so a markup change can temporarily prevent detection. An unknown country leaves the post visible. Requests use your existing X session and are subject to X's rate limits.
The location picker contains the ISO 3166-1 countries, plus Kosovo, using English CLDR display names. It also includes the broader English region labels exposed by X, such as West Asia, alongside country labels such as United Kingdom. Inclusion is a local user preference and does not assert anything about individual account holders.
Permissions
storage: saves settings and the local user cache.offscreen: parses returned HTML without opening visible tabs.tabs: opens and closes inactive About tabs when X requires client-side rendering.https://x.com/*: reads About pages and runs the feed filter on X.