Personal userscript (and Chrome extension) for X/Twitter that filters posts by country, region, or language with optional highlighting.
- Add or remove blocked countries, regions, and language scripts (no defaults).
- Choose filter behavior: hide or highlight matches (red border/background). Region-only accounts can be highlighted in yellow.
- Per-session and lifetime counts persisted to IndexedDB; exports available from the UI.
- Fetches profile “About” data to detect country/region and username change counts.
- Settings button in the left nav (🚫 icon) opens the modal for edits.
Sidebar Menu:
Settings Menu:
Shows all user's countries in posts:
Highlighted posts are obvious (if not blocked):
- Userscript: download
CleanX.user.jsfrom Releases (or useCleanX-user.jsin this repo) and install it in your userscript manager (Tampermonkey/Greasemonkey). - Chrome extension: download
CleanX-extension.zipfrom Releases and load as an unpacked extension inchrome://extensions(Developer Mode), or load theextension/folder directly. - Open X/Twitter and click the 🚫 CleanX button under Profile in the left nav.
- Add countries/regions/languages; toggle block vs highlight and region-only highlight.
- Reload to apply; use Export DB for debugging or backup.
- No build step; edit
CleanX-user.jsdirectly. - Optional format:
npx prettier --check "CleanX-user.js". - Primary storage:
localStorage+ IndexedDB (knownstore for users,statsfor totals). - Extension entrypoint:
extension/content.js, manifest atextension/manifest.json. - CI: pushes to
main/masterbuild artifacts (userscript, zipped extension, changelog) as workflow artifacts. Taggingv*publishes a GitHub Release with those files attached and the changelog as the release body.