A Chrome extension that automatically blocks AI tools whenever you open a competitive programming platform. Earn hints by working through the problem first — train harder, think deeper.
➜ Install from the Chrome Web Store
CF Focus automatically blocks AI chatbots (ChatGPT, Claude, Gemini, Copilot, and more) the moment you open a competitive programming platform such as Codeforces or LeetCode. Close the platform tab and AI sites become accessible again — no manual toggling required.
It also provides Focus Sessions (timed deep-work blocks, with an optional Hardcore mode that cannot be paused), a Progressive Hint Unlock system that rewards genuine effort, and tracks your daily streak, focus minutes, blocks avoided, and problems solved.
- Activates the moment you open a focus platform tab
- Deactivates automatically when the last focus tab closes
- Shows a calming blocked page with the site name, a motivational quote, and your hint progress
| Platform | Domain |
|---|---|
| Codeforces | codeforces.com |
| LeetCode | leetcode.com |
| AtCoder | atcoder.jp |
| HackerRank | hackerrank.com |
| CodeChef | codechef.com |
| CSES | cses.fi |
You can also add custom platforms (e.g. Kattis, open.kattis.com) to trigger blocking.
The longer you stay focused on a problem without snoozing or solving, the more help you earn:
- 0 → 15 min — Full block. No hints.
- 15 min — Hint 1 unlocks: general approach questions ("What data structure fits? Can you write the brute force?").
- 25 min — Hint 2 unlocks: specific algorithmic patterns ("If monotonic, binary-search the answer. Small N → bitmask.").
- 35 min — AI unlock button appears: you've put in real effort, you've earned a 10-min window of access.
All thresholds are configurable in Settings → Hints. The timer resets when you snooze, solve a problem, or close all focus tabs.
Start a timed deep-work block from the popup (15 / 25 / 45 / 60 / 90 min). Blocking stays on for the entire duration regardless of which tabs are open.
- Standard — you can end the session early.
- Hardcore — no snooze, no end, no exit. Disables the hint unlock too. Use sparingly.
- Toggle individual AI sites on/off
- Add any custom domain to block
- 19 AI sites blocked by default
- Pause blocking temporarily (5m / 15m / 30m / 1h / 2h)
- Keyboard shortcut:
Ctrl+Shift+B(Mac:⌘⇧B) - Auto-resumes when the snooze expires
- Disabled during Hardcore sessions
- Block AI during fixed hours regardless of open tabs
- Pick active days (Mon–Sun) and a time range
- Supports overnight windows (e.g. 22:00 → 02:00)
- Set a daily focus goal (30 min – 4 h). Progress shown in the popup.
- Optional break-reminder notification after sustained focus (25 / 50 / 90 / 120 min, or off).
- Today: minutes focused, AI blocks avoided, problems solved.
- All-time: total sessions, total focus hours, blocks avoided, problems solved.
- Streak: current and longest streak of consecutive focused days.
- Vertical bar chart and "resistance rate" donut in the Overview page.
- Set a 4–8 digit PIN to gate the Settings page
- PIN stored as SHA-256 hash, never plain text
- Useful for protecting against impulsive self-disabling
Settings sync across your Chrome devices via chrome.storage.sync. Stats stay per-device.
ChatGPT · OpenAI Chat · Claude · Gemini · Copilot · Bing Chat · Perplexity · Phind · Poe · DeepSeek · Grok · Mistral · You.com · Cohere · HuggingFace Chat · AI Studio · Writesonic · xAI · Character.AI
Install CF Focus from the Chrome Web Store →
- Open the listing on the Chrome Web Store.
- Click Add to Chrome, then confirm.
- The settings page opens automatically on first install.
- Open any enabled focus platform (e.g.
codeforces.com) - The extension badge shows ON — AI sites are now blocked
- Try opening ChatGPT → you'll see the blocked page instead, with your hint timeline
- Close all focus platform tabs → AI sites become accessible again
To temporarily pause blocking:
- Click the extension icon → Snooze Xm
- Or press
Ctrl+Shift+B/⌘⇧B
To start a Focus Session:
- Click the extension icon → pick a duration → optionally toggle Hardcore → Start Focus Session
To change settings:
- Click the ⚙ icon in the popup → opens the full settings page
codeforces-ai-blocker/
├── manifest.json # Extension manifest (Manifest V3)
├── background.js # Service worker — blocking, sessions, stats, hint tiers
│
├── popup.html # Toolbar popup — markup
├── popup.js # Toolbar popup — logic
├── options.html # Settings page — markup
├── options.js # Settings page — logic
├── blocked.html # Block screen shown when an AI site is intercepted
├── blocked.js # Block screen — logic
│
├── icons/ # Extension icons (16 / 48 / 128 px)
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
│
├── store-assets/ # Chrome Web Store listing assets
│ ├── LISTING.md
│ ├── SCREENSHOTS.md
│ ├── icon.svg
│ ├── promo-marquee.html
│ └── promo-small.html
│
├── DEPLOY.md # Build & publishing guide
├── PRIVACY.md # Privacy policy
├── README.md # Project documentation
└── LICENSE # MIT License
| Area | Files | Responsibility |
|---|---|---|
| Core | manifest.json, background.js |
Extension configuration and the service worker that drives blocking, focus sessions, stats, and hint tiers |
| UI | popup.*, options.*, blocked.* |
Toolbar popup, full settings page, and the screen shown when an AI site is blocked |
| Assets | icons/, store-assets/ |
Runtime icons and Chrome Web Store listing material |
| Docs | README.md, PRIVACY.md, DEPLOY.md, LICENSE |
Documentation, privacy policy, deployment notes, and license |
- Uses Chrome's
declarativeNetRequestAPI to redirect blocked sites toblocked.html— fast, reliable, and privacy-respecting (no request content is read) - Path-suffixed entries (Bing Chat, HF Chat) use
regexFilterso they only match the chat path - All DNR rules are dynamic — added/removed instantly when blocking state changes
- The service worker is stateless: on every event it queries open tabs fresh, so it works correctly after Chrome restarts or service worker eviction
- Settings live in
chrome.storage.sync; stats and per-tab hint timer inchrome.storage.local
- No data is ever sent to any server
- No browsing history is read or stored
- Only tab URLs are checked locally to detect focus platform tabs
- PIN is stored as a SHA-256 hash
See PRIVACY.md for the full policy.
Contributions are welcome. To add a new platform or AI site, edit the PLATFORMS / DEFAULT_BLOCKED arrays in background.js and mirror the change in options.js. Please open an issue to discuss substantial changes before submitting a pull request.
Yostina Abera 📧 aberayostina@gmail.com
Released under the MIT License. See LICENSE for details.
Copyright © 2026 Yostina Abera.