Focus on what matters. A powerful, zero-build Chrome extension that intelligently blocks inappropriate content and social media distractions using smart heuristic analysis.
- 🧠 Smart Analysis: Uses a local AI classifier to automatically detect and block inappropriate (adult) content in real-time.
- 🚫 Social Media Blocker: Pre-configured blocking for major distractions like Facebook, Instagram, Twitter/X, TikTok, and Reddit.
- ⚡ Zero-Build Architecture: No complex build steps (Webpack/Parcel). Just standard HTML, CSS, and JavaScript.
- 🎨 Dynamic Block Page: Features a beautiful, animated block page that serves GIFs via the GIPHY API (or a fallback emoji) to lighten the mood.
- ✅ Whitelist & Blocklist: Easily manage your allowed and blocked sites directly from the extension popup.
- 🔒 Privacy First: All analysis happens locally on your device. No browsing history is ever sent to a server.
- Clone this repository:
git clone https://github.com/harsh98trivedi/siteblocker.git
- Configure API Key:
- Create a
.envfile in the root directory. - Add your GIPHY API key:
GIPHY_API_KEY=your_key_here - Run
npm run configto generate theconfig.jsfile. - Alternatively, manually create
config.jswith:export const CONFIG = { GIPHY_API_KEY: "your_key_here" };
- Create a
- Load in Chrome:
- Open Chrome and go to
chrome://extensions/. - Enable Developer mode (top right toggle).
- Click Load unpacked.
- Select the
siteblockerfolder.
- Open Chrome and go to
To enable the animated GIFs on the block page, you need a free GIPHY API key:
- Go to the GIPHY Developers Dashboard.
- Create an account and a new App.
- Copy your API Key.
- Add it to your
.envfile or directly intoconfig.js.
Click the extension icon in your toolbar to access controls:
- Current Site: View the current domain and instantly Block or Whitelist it.
- Whitelisted Domains: Add domains that should never be blocked (e.g., specific research sites).
- Quick Add: One-click buttons to block common social media platforms.
When you visit a blocked site:
- You'll be redirected to a "Content Blocked" or "Stay Focused" page.
- A random GIF related to "focus" or "smirk" will play (if API is configured).
- If the API fails or is missing, a large friendly emoji will appear instead.
- You can click Close Tab to quickly get back to work.
- Manifest V3: Built with the latest Chrome Extension standards.
- Vanilla JS: No frameworks, ensuring lightweight performance.
- GSAP: Powered by GreenSock for smooth, professional animations.
- TensorFlow/Classifier: (Concept) Local heuristic analysis for content detection.
Made with ❤️ for productivity.
