A modern, feature-rich Pomodoro-style interval timer with persistent state and audio notifications.
- 🎯 Customizable Work & Break Sessions - Set your own work and break durations
- 💾 Persistent State - Timer continues running even after page reload or browser restart
- 🔔 Smart Notifications - Desktop notifications when phases complete
- 🔊 Audio Alerts - Optional sound notifications (can be toggled on/off)
- ⏸️ Pause & Resume - Full control with start, pause, and reset buttons
- 📱 Responsive Design - Works beautifully on desktop and mobile devices
- 🎨 Modern UI - Clean, gradient-based design with smooth animations
- 📊 Visual Feedback - Timer display pulses when active
- 🌐 Browser Tab Updates - See remaining time in your browser tab
- Open
index.htmlin your web browser - Set your desired work and break durations (default: 25 min work, 5 min break)
- Enable audio alerts if desired
- Click Start to begin your focus session
- Get notified when it's time to take a break!
clocky/
├── index.html # Main HTML structure
├── styles.css # Modern, responsive styling
├── script.js # Timer logic and state management
└── README.md # This file
- HTML5 - Semantic markup
- CSS3 - Modern styling with gradients and animations
- Vanilla JavaScript - No dependencies
- Web Audio API - For audio notifications
- Notifications API - For desktop alerts
- Cookies - For state persistence
- Configure your work duration (1-180 minutes)
- Configure your break duration (1-60 minutes)
- Click Start to begin
- Start - Begin or resume the timer
- Pause - Pause the current session (state is saved)
- Reset - Reset timer to work session start
- Enable audio alerts - Toggle sound notifications on phase completion
- Preferences are automatically saved and persist across sessions
This timer implements the Pomodoro Technique:
- Work for a focused period (default 25 minutes)
- Take a short break (default 5 minutes)
- Repeat to maintain productivity and prevent burnout
All data is stored locally in browser cookies. No external services or tracking.
- Fixed incomplete
window.beforeunloadevent handler - Improved cookie persistence with proper expiration
- Enhanced state management for reliable resume after reload
- Added validation for all user inputs
- Fixed timer accuracy with timestamp-based calculations
- Modern gradient background (purple theme)
- Smooth animations and transitions
- Larger, more readable timer display (56px)
- Responsive design for all screen sizes
- Professional button styling with hover effects
- Better visual hierarchy with cards and sections
Open source - feel free to use and modify!
Contributions are welcome! Feel free to submit issues and pull requests.
Focus Timer v2.0 - Stay productive with the Pomodoro technique 🍅
