Instantly kills YouTube Shorts and Instagram Reels tabs - no warnings, no second chances.
A lightweight Chrome browser extension that closes tabs the moment you navigate to YouTube Shorts or Instagram Reels. Built for people who want a hard stop, not a nudge.
- ⚡ Instant tab closure - closes the tab before the page even loads
- 🎯 Covers both platforms - YouTube Shorts + Instagram Reels/Reel
- 🔄 SPA-aware - catches in-app navigation (no page reload needed)
- 📊 Blocked tab counter - tracks how many distractions you've dodged
- 🔕 Toggle on/off - pause blocking without uninstalling
- 🔒 No data collection - everything stays local, zero network requests
- Clone the repository
git clone https://github.com/openvaibhav/shortblocker.git
- Open Chrome and go to
chrome://extensions/ - Enable Developer mode (top-right toggle)
- Click Load unpacked
- Select the
shortblockerfolder - The extension icon will appear in your toolbar ✅
Works on all Chromium-based browsers - Chrome, Edge, Brave, Arc, Opera.
shortblocker/
├── manifest.json
├── icons/
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
└── src/
├── background.js
├── content.js
├── popup.html
└── popup.js
ShortBlocker uses a two-layer approach to make sure no Short or Reel ever loads:
- Listens to
chrome.tabs.onUpdatedandchrome.tabs.onCreated - The moment a tab's URL matches a Shorts/Reels pattern, it calls
chrome.tabs.remove() - Uses a dedup set to prevent double-counting when multiple events fire for the same tab
- Injected into YouTube and Instagram pages at
document_start - Patches
history.pushStateandhistory.replaceStateto catch in-app SPA navigation - Catches the case where you're already on YouTube and click into Shorts from the sidebar without a full page reload
| Platform | Pattern |
|---|---|
| YouTube | youtube.com/shorts/* |
instagram.com/reels/* |
|
instagram.com/reel/* |
Want to add more blocked patterns? Open src/background.js and src/content.js and add to the BLOCKED_PATTERNS array:
const BLOCKED_PATTERNS = [
/youtube\.com\/shorts\//i,
/instagram\.com\/reels\//i,
/instagram\.com\/reel\//i,
// Add your own:
// /tiktok\.com/i,
// /twitter\.com\/i\/status/i,
];Q: Will this affect normal YouTube or Instagram browsing?
A: No. Only URLs containing /shorts/ or /reels/ are affected.
Q: What if I want to watch a Short?
A: Toggle the extension off from the popup, watch your short, toggle back on. Or just... don't. That's kind of the point.
Q: Does this send any data anywhere?
A: Absolutely not. All data (counter, settings) is stored locally via chrome.storage.local.
Q: Why does the tab flash briefly before closing?
A: In some cases the background script may receive the URL slightly after the page starts loading. The content script handles this as a second layer to minimize any flash.
Pull requests are welcome! Some ideas for contribution:
- Add TikTok support
- Daily/weekly stats dashboard
- Allowlist for specific channels
- Custom redirect URL instead of closing (e.g., redirect to a focus page)
MIT License - see LICENSE for details.
Built to reclaim your attention. One closed tab at a time.