GeoFilter is an unofficial Chrome extension that hides X timeline posts when an account's reported location is outside your selected countries and regions. Whitelisted and unresolved accounts remain visible. GeoFilter is not affiliated with, endorsed by, or sponsored by X Corp.
GeoFilter automates access to X pages to resolve account locations. X can restrict automated access, scraping, and browser automation. Before you install, modify, distribute, or use GeoFilter, review and follow the current X Terms of Service, X Developer Policy, and all other rules that apply to your account and jurisdiction.
Use GeoFilter at your own risk. X can change its interface, policies, rate limits, or enforcement practices at any time. Using this extension can cause requests to fail, trigger rate limits, or expose your X account to restrictions or suspension. The authors and contributors do not guarantee that any use is permitted by X or safe for your account.
Users do not need Node.js or a build tool.
- Download
GeoFilter-v1.0.0.zipfrom the latest GitHub release. - Extract the ZIP to a permanent folder.
- Open
chrome://extensionsin Google Chrome. - Enable Developer mode.
- Select Load unpacked and choose the extracted folder.
Chrome does not load the release ZIP directly. Keep the extracted folder after installation because Chrome loads the extension from that location.
Requirements: Node.js and Google Chrome.
npm install
npm run typecheck
npm test
npm run buildOpen chrome://extensions, enable Developer mode, select Load unpacked, and choose the generated dist directory.
Use npm run watch during development. Reload the extension from chrome://extensions after a rebuild.
- Open the GeoFilter toolbar popup.
- Clear any regions that you do not want to keep. A new install selects all regions.
- Open a location group, such as South Asia, to select individual countries instead.
- Enter each handle that GeoFilter must always allow. Remove a handle from its visible chip when needed.
- Turn GeoFilter on. The popup saves each change automatically.
GeoFilter stays disabled when no location is selected. Region and country selections form an allowlist. For example, selecting South Asia allows a country result such as Pakistan and a region-only result such as South Asia. Selecting Pakistan alone does not allow a region-only South Asia result.
X renders the Account based in value with JavaScript. A normal GET returns only X's application shell. GeoFilter puts uncached authors in one deduplicated queue and processes them with reusable inactive tabs. Set Lookup tabs from 1 to 4 in the popup. The default is one. More tabs reduce lookup time but use more memory and create more X traffic.
GeoFilter does not switch to a resolver tab. If you activate one, work in that tab pauses until you leave it. GeoFilter adopts resolver tabs left from an earlier service-worker run and closes idle tabs above the configured limit.
The resolver looks for [data-testid="pivot"], finds the row labeled exactly Account based in, and reads the value from that row. It normalizes X-style labels such as East Asia and Viet Nam. It does not use X's generated CSS classes or scan unrelated page text. The English label is required.
Resolved locations remain cached for 30 days. Unknown results remain cached for 24 hours. When About rows render without an account location, GeoFilter waits briefly for late content and then records an unknown result. A 15-second hard timeout handles pages that never render. If X changes the page, a request fails, or a value is not recognized, GeoFilter keeps that account's posts visible.
The popup shows lifetime post-hide actions and unique blocked handles. A revisited post can count as another hide action. Use Reset beside the popup totals to clear both values.
GeoFilter stores settings, reported locations, blocked handles, and counters in chrome.storage.local. It does not store Post IDs, post text, credentials, or analytics. It sends no data to a GeoFilter server. The extension requests access only to X, Twitter, extension storage, and the tab operations required for its resolver tab.
npm run typecheck
npm test
npm run buildThe tests cover filtering policy, location aliases, cache expiry, statistics, and the semantic DOM selectors used for timeline cells and About pages. A live X smoke test is still required after X changes its interface.
Country metadata comes from the world-countries dataset under the ODbL 1.0 license. Region membership follows its UN-style geographic groupings. Display aliases match X labels, such as South Asia and East Asia.
GeoFilter's source code is available under the MIT License. Third-party data and dependencies retain their own licenses. In particular, the bundled world-countries dataset is available under ODbL 1.0.