A Chrome extension that helps competitive programmers solve Codeforces problems using AI assistance from OpenAI, Claude, or Google Gemini.
- 🤖 Multi-AI Support: Choose between OpenAI GPT-4, Claude, or Google Gemini
- 🌐 Multi-language: Get explanations in English or Hinglish
- 💻 Multiple Programming Languages: Generate solutions in C++, Python, Java, C, JavaScript, Go, or Rust
- 📊 Usage Statistics: Track your problem-solving progress
- ⚙️ Customizable Settings: Set default preferences and manage API keys
- 🎨 Modern UI: Beautiful, responsive interface with dark/light theme support
- Clone or download this repository
- Open Chrome and go to
chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extension folder
- The extension should now appear in your extensions list
-
Add Icons: Place your icon files in the
icons/
folder:icon16.png
(16x16 pixels)icon32.png
(32x32 pixels)icon48.png
(48x48 pixels)icon128.png
(128x128 pixels)
-
Configure API Keys:
- Click the extension icon and go to Options
- Add your API key for your preferred AI provider:
- OpenAI: Get from OpenAI API Keys
- Claude: Get from Anthropic Console
- Gemini: Get from Google AI Studio
- Navigate to any Codeforces problem page
- Click the extension icon in your browser toolbar
- Select your preferred approach language and code language
- Click "Generate Solution"
- Copy the generated approach and code
https://codeforces.com/problemset/problem/*
https://codeforces.com/contest/*/problem/*
https://codeforces.com/gym/*/problem/*
activeTab
: To access the current Codeforces pagestorage
: To save your settings and API keyscontextMenus
: To add right-click menu optionsscripting
: To extract problem data from pagesnotifications
: To show status notifications
├── manifest.json # Extension configuration
├── background.js # Service worker for background tasks
├── content.js # Content script for problem extraction
├── popup.html # Extension popup interface
├── popup.js # Popup functionality
├── popup.css # Popup styling
├── options.html # Settings page
├── options.js # Settings functionality
├── icons/ # Extension icons
└── README.md # This file
- Background Script (
background.js
): Handles extension lifecycle, context menus, and message passing - Content Script (
content.js
): Extracts problem data from Codeforces pages - Popup (
popup.html/js/css
): Main user interface for generating solutions - Options Page (
options.html/js
): Settings and API key management
The extension supports three AI providers:
- OpenAI GPT-4: Uses the Chat Completions API
- Claude: Uses the Messages API
- Google Gemini: Uses the Generate Content API
- Sync Storage: API keys and user preferences
- Local Storage: Usage statistics and cache data
-
Extension not working on Codeforces:
- Make sure you're on a supported Codeforces page
- Check that the extension is enabled
- Refresh the page and try again
-
API errors:
- Verify your API key is correct
- Check your API quota/billing
- Test the connection in the options page
-
Problem data not loading:
- Ensure you're on a problem page (not contest list)
- Check browser console for errors
- Try refreshing the page
- Open Chrome DevTools (F12)
- Go to the Console tab
- Look for extension-related log messages
- Check for any error messages
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Abhinav
- Initial release
- Multi-AI provider support
- Problem extraction from Codeforces
- Modern UI with theme support
- Settings and statistics tracking
Made with ❤️ & ☕ by Abhinav
⭐ Star this repository if it helps you break free from unwanted habits!