Block an X user as easy as liking a post.
Tired of seeing tweets from people you'd rather not? BlockMaster turns the useless "analytics" button into a one-click nuke button. No confirmation dialogs. No extra clicks. Just block and move on.
X's native block flow is annoying:
- Click the three dots
- Scroll through a menu
- Click "Block"
- Confirm
- Why so many steps???
BlockMaster: See a post → Click "block" → Gone. That's it.
| Feature | What it does |
|---|---|
| ⚡ Instant Block | One click. No dialogs. No friction. |
| 🎯 Smart Focus | Press B to block whatever post is centered on your screen |
| 🗑️ Auto-Vanish | Blocked posts immediately fade out and disappear |
| 🔗 Quick View | Toast notification has a "View" button to visit their profile (for unblock) |
| 📊 Stats | See how many people you've yeeted this session |
| 🧠 Rate Limit Aware | Detects X's "slow down" messages and shows retry time |
- Open Chrome →
chrome://extensions/ - Flip the Developer mode switch (top right)
- Click "Load unpacked"
- Select this folder
- Done. Go block some people.
We're working on it. For now, use the manual method above.
- Scroll X like normal
- See someone you don't vibe with?
- Click the red "block" button (replaces the useless analytics button)
- They disappear instantly. Poof. Gone.
| State | What it means |
|---|---|
| 🔴 block | Ready to yeet this user |
| ⏳ ... | Nuking them from orbit... |
| ✅ blocked | Successfully removed from your life |
Too lazy to move your mouse?
- Scroll so the annoying post is in the middle of your screen
- Press
B - Post deleted. User blocked. Timeline cleaned.
Works great when speed-running your block list.
Click the BlockMaster icon in Chrome toolbar:
| Setting | What it does | Default |
|---|---|---|
| Remove After Block | Make posts disappear immediately | ✅ On |
| Show Notifications | Toast messages for success/fails | ✅ On |
| Keyboard Shortcut (B) | Enable the 'B' key for blocking | ✅ On |
Pro tip: Disable notifications if you're blocking a lot of people at once. Less noise, more blocking.
┌─────────────────────────────────────────────────────────────┐
│ X.com Timeline │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Post @someuser │ │
│ │ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │ Reply │ │ Retweet│ │ Like │ │ block │ ←──────┼──┤
│ │ └────────┘ └────────┘ └────────┘ └────────┘ │ │
│ │ (replaced from analytics) │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
File Structure
blockmaster-ext/
├── manifest.json # Extension manifest (MV3)
├── content.js # Content script - DOM manipulation & API calls
├── styles.css # Button styling & animations
├── popup.html # Settings popup UI
├── popup.js # Settings popup logic
├── README.md # This file
└── icons/ # Extension icons (16, 48, 128px)
├── icon16.png
├── icon48.png
└── icon128.png
- DOM Detection: Uses
MutationObserverto detect new posts as you scroll - Username Extraction: Extracts the author's username from the post's DOM structure
- Button Replacement: Replaces the analytics link with a custom block button
- API Integration: Calls X's internal
blocks/create.jsonendpoint - Rate Limiting: Detects HTTP 429 responses and implements retry delays
- Post Removal: Fades out and removes the post immediately after blocking
- XSS Protection: Usernames are inserted using
textContent, notinnerHTML - No Credential Storage: Extension uses the page's existing session cookies
- Isolated Execution: Content script runs in isolated world with limited privileges
- User Confirmation: Optional confirmation dialog prevents accidental blocks
- Batch Processing: New posts are queued and processed in batches (50ms window)
- Quick Tag Filtering: Checks
tagNameanddata-testidbefore expensive queries - Memory Management: Uses DOM attributes for state tracking
- Resource Cleanup: Observer disconnects on page unload or extension disable
const CONFIG = {
DEBUG: false, // Enable console logging
SELECTORS: {
article: 'article[data-testid="tweet"]',
analyticsButton: 'a[href*="/analytics"]',
userNameLink: 'a[role="link"][href^="/"]',
userNameContainer: '[data-testid="User-Name"]',
},
// ... other config
};The extension uses X's internal API:
POST https://x.com/i/api/1.1/blocks/create.json
Body: screen_name={username}&skip_status=1
This is the same endpoint used by X's web interface, accessed via the user's active session.
-
Rate Limiting: X gets mad if you block too fast. The extension handles this gracefully with retry timers.
-
DOM Changes: X updates their code frequently. If buttons disappear, they probably changed their HTML structure. File an issue.
-
Must Be Logged In: Obviously. You can't block people if you're not logged in.
-
Bearer Token: That long string of gibberish is X's public web client token. Everyone using x.com has the same one. It's fine.
Try this checklist:
- Are you logged into X? No? Log in.
- Reload the extension:
chrome://extensions/→ click the 🔄 icon on BlockMaster - Check the console: F12 → Console → search for
[BlockMaster] - Still broken?: Open an issue
X is telling you to chill. You blocked too many people too fast.
- Wait a minute or two
- The toast will show you exactly how long to wait
- Go grab a coffee, come back, continue your crusade
Some posts don't have analytics buttons (replies, promoted tweets, etc.). BlockMaster only appears where the analytics button would be.
Also, try scrolling. The extension needs to "see" the post first.
- Clone the repository
- Make changes to files
- Go to
chrome://extensions/and reload the extension - Refresh the X page to see changes
Icons are generated from SVG using ImageMagick:
cd icons
# Requires: brew install librsvg
rsvg-convert -w 16 -h 16 icon.svg -o icon16.png
rsvg-convert -w 48 -h 48 icon.svg -o icon48.png
rsvg-convert -w 128 -h 128 icon.svg -o icon128.pngThe ban/prohibition symbol icon is from Tabler Icons, licensed under MIT.
BlockMaster does not collect, store, or transmit any user data:
- No analytics or telemetry
- No data sent to external servers
- Only communicates with X's official API endpoints
- Settings stored locally in Chrome's sync storage
- Source code is fully open for inspection
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Better username extraction logic
- Support for additional languages
- Keyboard shortcuts for blocking
- Bulk block functionality
- Block list import/export
- Simplified button text to just "block"
- Removed post placeholder, now removes immediately
- Removed profile page popup
- Added batch processing for MutationObserver
- Fixed isolated world context issues
- Improved username extraction with query param stripping
- Added comprehensive error handling
- Initial release
- Basic block functionality
- Settings popup with toggles
- Toast notifications
- Session statistics
MIT License
Copyright (c) 2024 BlockMaster Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Icon by Tabler Icons (MIT License)
- Built with Manifest V3 and modern JavaScript
- Inspired by the need for faster blocking on X
- GitHub Issues: github.com/yourusername/blockmaster/issues
- Email: your.email@example.com
Disclaimer: This extension is not affiliated with X Corp. Use at your own risk. Blocking users is irreversible through this extension interface.