A Chrome extension that adds a one-click block button to posts on X (Twitter).
- Adds a block button next to the "..." menu on every tweet
- One-click blocking - no confirmation dialogs
- Visual feedback: red hover, spinning while loading, green on success
- Dynamically captures auth tokens from your session (no hardcoded credentials)
- Clone this repository
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the cloned folder
Navigate to x.com while logged in. You'll see a block icon (circle with slash) next to the "..." menu on each tweet. Click it to instantly block that user.
The extension:
- Injects an interceptor at page load to capture the Bearer token from X's own API requests
- Reads the CSRF token from cookies
- When you click block, it fetches the user ID via X's GraphQL API
- Calls the block API endpoint
manifest.json- Chrome extension manifest (Manifest V3)injector.js- Runs at document_start to inject scripts into page contextinterceptor.js- Captures Bearer token from X's fetch/XHR requestscontent.js- Main logic: adds buttons, handles clicks, calls APIsstyles.css- Button styling and animations
This extension was built with OpenCode. View the session: https://opncd.ai/share/vi0jGZL7
MIT