A browser extension that tracks the time you spend on websites
Features • Installation • Usage • Privacy • Development
- Automatic Time Tracking — Tracks active browsing time on each website automatically
- Date-Based Analytics — View statistics by Today, Yesterday, Last 7 Days, Last 30 Days, or All Time
- Export to JSON — Download your browsing data for external analysis
- Search — Quickly find specific websites in your history
- Visual Statistics — Progress bars show relative time spent on each site
- Persistent Storage — Data is stored locally and persists across browser restarts
- Flexible Data Management — Clear data by specific time ranges (today, week, month, or all)
- Real-Time Updates — Stats refresh every second while popup is open
- Modern UI — Clean, gradient-based design with smooth animations
| Browser | Status |
|---|---|
| Brave | Fully Supported |
| Chrome | Fully Supported |
| Edge | Fully Supported |
| Safari | Supported (requires conversion) |
| Firefox | Coming Soon |
-
Download or clone this repository
git clone https://github.com/User-LazySloth/TimeKeep.git
-
Open your browser and navigate to the extensions page:
- Brave:
brave://extensions/ - Chrome:
chrome://extensions/ - Edge:
edge://extensions/
- Brave:
-
Enable Developer mode (toggle in the top right corner)
-
Click "Load unpacked"
-
Select the
TimeKeepfolder -
The extension icon will appear in your toolbar!
-
Install Xcode from the Mac App Store
-
Open Terminal and run:
xcrun safari-web-extension-converter /path/to/TimeKeep --app-name TimeKeep
-
Open the generated Xcode project
-
Build and run (⌘ + R)
-
In Safari, go to Preferences → Extensions and enable TimeKeep
- Click the TimeKeep icon in your browser toolbar
- View your browsing statistics with time spent on each website
- Use the date filter to view different time periods:
- Today
- Yesterday
- Last 7 Days
- Last 30 Days
- All Time
Type in the search box to filter websites by name.
- Click the 🗑️ button
- Choose what to clear:
- Today Only — Clear only today's data
- Yesterday Only — Clear only yesterday's data
- Last 7 Days — Clear the past week
- Last 30 Days — Clear the past month
- All Data — Clear everything (with confirmation)
- Click the 📥 button
- Choose the time range to export:
- Today — Export today's data
- Yesterday — Export yesterday's data
- Last 7 Days — Export the past week
- Last 30 Days — Export the past month
- All Time — Export all data
- A JSON file will be downloaded with your browsing data
Exported JSON format:
{
"exportedAt": "2026-01-30T10:30:00.000Z",
"dateRange": "week",
"data": {
"2026-01-30": {
"github.com": {
"milliseconds": 1234567,
"readable": "20m 34s"
}
}
}
}TimeKeep is designed with privacy in mind:
- 100% Local — All data is stored locally on your device
- No Servers — No data is ever sent to external servers
- No Analytics — No usage tracking or telemetry
- No Account Required — Works completely offline
- You Control Your Data — Clear it anytime with one click
- Browser internal pages (
chrome://,brave://,edge://, etc.) - New tab pages
- Extension pages
- Local files (
file://) - Time when browser is not in focus
TimeKeep/
├── manifest.json # Extension manifest (Manifest V3)
├── background.js # Service worker for time tracking
├── popup.html # Extension popup UI
├── popup.js # Popup logic and rendering
├── popup.css # Styling
├── icons/ # Extension icons
│ ├── template.svg # SVG template for icons
│ └── icon128.png # Icon of 128x128 dimension
└── README.md # This file
-
Background Service Worker (
background.js)- Listens for tab changes, window focus, and new window events
- Tracks time spent on active tab
- Saves data every 5 seconds to local storage
- Stops tracking when browser loses focus
- Handles edge cases:
- Detects when a page finishes loading (not just URL changes)
- Properly tracks new tabs/windows after they load
- Ignores temporary
about:blankstates during navigation
-
Data Structure
{ "2026-01-29": { "github.com": 1234567, // milliseconds "google.com": 987654 }, "2026-01-28": { "youtube.com": 3456789 } }
-
Popup Interface (
popup.html/js/css)- Reads from local storage
- Aggregates data based on selected date range
- Displays sorted list with visual progress bars
- Refreshes every second for real-time updates
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
- Export data to JSON
- Daily/weekly email reports
- Set time limits with notifications
- Website categorization (Social, Work, Entertainment)
- Dark mode
- Firefox support
- Sync across devices (optional)
- Detailed charts and graphs
Made with ❤️ for productivity enthusiasts