A powerful browser extension that provides a floating stopwatch for Codeforces problem-solving with persistent timing, comprehensive statistics, and performance tracking.
- Floating Widget: Appears only on Codeforces problem pages
- Real-time Tracking: Start/Pause/Reset with precise second-by-second updates
- Draggable Interface: Repositionable widget with persistent position memory
- Theme Integration: Automatic light/dark mode detection matching Codeforces
- Comprehensive Stats: Total time, daily progress, average solve times
- Problem History: Track all attempted problems with session details
- Performance Metrics: Visualize your improvement over time
- Solved Tracking: Mark problems as completed for accurate statistics
- Persistent Storage: Timer state survives page reloads and browser restarts
- Per-Problem Tracking: Individual timing for each contest problem
- Local-Only: No external network calls, complete privacy
- Data Export: Clear or manage your historical data
- Minimal Performance Impact: <2% CPU usage, optimized for efficiency
- Responsive Design: Works seamlessly on desktop and mobile
- Intuitive Controls: Clean, accessible interface
- Global Settings: Enable/disable extension with one click
- Quick Presets: 15min, 30min, 45min, 1hr, 2hr countdown options
- Custom Duration: Set any countdown time up to 5 hours
- Visual Warnings: Color-coded alerts (Green β Orange β Red) as time runs out
- Progress Bar: Real-time visual countdown progress indicator
- Sound Alerts: Audio notification when countdown completes
- Smart Notifications: Enhanced browser notifications with countdown details
- Auto-Reset: Automatic timer reset after countdown completion
- Progress Badges: Unlock achievements for solving 1, 5, 25, 100+ problems
- Speed Badges: Earn recognition for fast solve times (under 5min, 3min, 1min)
- Time Badges: Milestone rewards for total coding hours (1hr, 10hrs, 100hrs)
- Streak Badges: Daily practice consistency rewards (3, 7, 30 days)
- Focus Badges: Countdown mode usage milestones and completion tracking
- Visual Feedback: Animated toast notifications for new achievement unlocks
- Progress Tracking: Real-time progress indicators showing next milestone goals
- Achievement Dashboard: Dedicated tab in stats page with completion overview
-
Clone the repository:
git clone https://github.com/knileshh/CodeTimer.git cd codeforces-timer-extension -
Load in Chrome:
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the project folder
- Open
-
Start tracking:
- Navigate to any Codeforces problem page
- The timer widget will appear automatically
- Click βΆ to start timing your solution
The extension is available on the Chrome Web Store for easy installation.
| Button | Function | Description |
|---|---|---|
| βΆ | Start | Begin timing your problem-solving session |
| βΈ | Pause | Temporarily stop the timer |
| βΉ | Reset | Clear current session and start over |
| β | Solved | Mark problem as completed |
| β° | Countdown | Toggle between stopwatch and countdown modes |
| π | Stats | Open detailed statistics dashboard |
The countdown feature helps you practice time management for competitive programming:
- Quick Setup:
- Click β° button once to see options, twice for 30min default
- Keyboard shortcut:
Ctrl+Cfor instant countdown toggle
- Preset Options: One-click 15min, 30min, 45min, 1hr, or 2hr countdowns
- Custom Duration: Enter any time in the input field (up to 5 hours)
- Smart UX: Helpful tips and single-click defaults for faster setup
- Visual Feedback:
- Green Progress Bar: More than 25% time remaining
- Orange Warning: 10-25% time remaining
- Red Alert: Less than 10% time remaining
- Completion Alerts: Sound notification and browser alert when time expires
- Auto-Reset: Timer automatically resets 5 seconds after completion
Access comprehensive analytics through:
- Extension Popup: Quick overview and settings
- Stats Page: Detailed breakdown of your progress
- Widget Button: Direct access from timer
- Automatic Saving: Timer state persists across sessions
- Problem-Specific: Each problem maintains independent timing
- History Tracking: Complete session logs with timestamps
- Privacy-First: All data stored locally on your device
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Content β β Background β β Popup/Stats β
β Script βββββΊβ Service βββββΊβ Interface β
β (Timer UI) β β Worker β β (Settings) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
ββββββββββββββββββββ
β Chrome Storage β
β (Local Data) β
ββββββββββββββββββββ
// Storage schema for each problem
{
"cf_<contestId>_<problemLetter>": {
"elapsedSeconds": 432, // Total time spent
"isRunning": false, // Current timer state
"lastUpdated": "2025-01-20T...", // Last modification
"history": [ // Session history
{
"start": "2025-01-20T12:45:00Z",
"end": "2025-01-20T13:00:00Z",
"solved": true // Completion status
}
]
}
}- Efficient Storage: Batched writes every 5 seconds
- Memory Management: Automatic cleanup of old sessions
- CPU Optimization: Minimal background processing
- Network Efficiency: Zero external dependencies
- Node.js 16+ (for development tools)
- Chrome Browser (for testing)
- Git (for version control)
codeforces-timer-extension/
βββ manifest.json # Extension configuration
βββ background.js # Service worker
βββ content.js # Timer widget logic
βββ popup.html # Extension popup
βββ popup.js # Popup functionality
βββ stats.html # Statistics dashboard
βββ stats.js # Stats page logic
βββ styles.css # Shared styling
βββ README.md # Documentation
βββ .git/ # Version control
-
Development Mode:
# Load extension in Chrome developer mode # Make changes to source files # Reload extension in chrome://extensions/
-
Testing Checklist:
- Timer appears on problem pages only
- Start/Pause/Reset functionality works
- Position persists after page reload
- Theme switching works correctly
- Statistics display accurate data
- Data clearing functions properly
We welcome contributions! Please follow these guidelines:
- 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
- ES6+ JavaScript with modern syntax
- Consistent naming conventions (camelCase)
- Comprehensive comments for complex logic
- Error handling for all async operations
- Enhanced Countdown Mode: Quick presets, progress bar, visual warnings
- Improved UI: Better visual feedback and user experience
- Sound Alerts: Audio notifications for countdown completion
- Progress Tracking: Real-time countdown progress visualization
- Achievement System: Unlock badges for milestones
- Export Data: Download statistics as CSV/JSON
- Keyboard Shortcuts: Quick timer controls
- Custom Themes: Personalized widget appearance
- ML Predictions: AI-powered solve time estimates
- Multi-Platform: Support for AtCoder, LeetCode
- Team Features: Collaborative problem solving
- Advanced Analytics: Performance trends and insights
- Cloud Sync: Cross-device data synchronization
- Social Features: Share progress with friends
- Custom Themes: Personalized widget appearance
- API Integration: Connect with competitive programming APIs
- Issues: Report bugs or request features on GitHub
- Discussions: Join community conversations
- Documentation: Comprehensive guides and tutorials
- Chrome Extension Docs: developer.chrome.com
- Codeforces API: codeforces.com/api
- Competitive Programming: cp-algorithms.com
This project is licensed under the MIT License - see the LICENSE file for details.
- Codeforces for providing an amazing competitive programming platform
- Chrome Extension Team for excellent developer tools and documentation
- Open Source Community for inspiration and best practices
Made with β€οΈ for the competitive programming community
Track your progress, improve your speed, and become a better problem solver!