A Chrome extension that enhances your reading experience with personalized features like reading time estimates, focus mode, and reading statistics.
- Personal Reading Time Estimator - Displays an estimated reading time badge on articles
- Automatic article detection on popular platforms (Medium, Substack, WordPress, etc.)
- Word count analysis with CJK character support
- Personalized reading speed (default: 238 wpm)
- Clean, non-intrusive badge UI with Candyland design
- Focus Highlighter - Dim surrounding content while reading
- Scroll Progress Indicator - Visual reading progress bar
- Reading Statistics & Rewards - Track your reading habits
- Click to Define - Dictionary lookup without leaving the page
-
Prerequisites
- Node.js 18+
- npm or pnpm
-
Clone and Install
git clone <repository-url> cd Glimpse npm install
-
Build the Extension
# Development build (with watch mode) npm run dev # Production build npm run build
-
Load in Chrome
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
dist/folder from this project
- Open Chrome and navigate to
-
Create Icons Before loading, create icon files in
dist/icons/:icon-16.png(16x16 pixels)icon-32.png(32x32 pixels)icon-48.png(48x48 pixels)icon-128.png(128x128 pixels)
Quick placeholder command (requires ImageMagick):
mkdir -p dist/icons for size in 16 32 48 128; do convert -size ${size}x${size} xc:#F5A9B8 dist/icons/icon-${size}.png done
Glimpse/
├── src/
│ ├── background/ # Service worker (background script)
│ │ └── service-worker.ts
│ ├── content/ # Content scripts injected into pages
│ │ └── content.ts
│ ├── popup/ # Extension popup UI
│ │ ├── popup.html
│ │ └── popup.ts
│ ├── styles/ # CSS stylesheets
│ │ ├── base.css # Base design system
│ │ ├── content.css # Injected page styles
│ │ └── popup.css # Popup styles
│ ├── types/ # TypeScript type definitions
│ │ └── index.ts
│ ├── utils/ # Utility functions
│ │ ├── article-parser.ts
│ │ ├── messaging.ts
│ │ └── storage.ts
│ ├── icons/ # Extension icons
│ ├── _locales/ # i18n translations
│ │ ├── en/messages.json
│ │ └── de/messages.json
│ └── manifest.json # Extension manifest (MV3)
├── docs/ # Documentation
├── dist/ # Build output (git-ignored)
├── package.json
├── tsconfig.json
├── vite.config.ts
├── tailwind.config.js
└── README.md
- TypeScript - Type-safe JavaScript
- Vite - Fast build tool
- Tailwind CSS - Utility-first styling
- Chrome Extension Manifest V3 - Latest extension standard
This extension uses the Candyland design theme featuring:
- Soft pastels and vibrant accents
- Primary: Peachy pink (
oklch(0.8677 0.0735 7.0855)) - Secondary: Soft blue/lavender (
oklch(0.8148 0.0819 225.7537)) - Accent: Lime green (
oklch(0.9680 0.2110 109.7692)) - Font: Poppins (primary), Roboto Mono (code)
- Border radius: 0.5rem consistently
See docs/candyland-design-style.md for the complete style guide.
| Command | Description |
|---|---|
npm run dev |
Build with file watching |
npm run build |
Production build |
npm run lint |
Run ESLint |
npm run type-check |
TypeScript type checking |
- Build the extension:
npm run build - Load in Chrome (see Installation)
- Navigate to an article page (Medium, Substack, dev.to, etc.)
- The reading time badge should appear in the top-right corner
- Click the extension icon to see the popup with current page info
- Popup: Right-click extension icon → "Inspect popup"
- Background:
chrome://extensions/→ Click "Service worker" link - Content Script: Open DevTools on any page → Console tab
Using Chrome's latest Manifest V3 standard:
- Service Worker instead of background page
- Declarative content scripts
- Stricter CSP
Components communicate via chrome.runtime.sendMessage:
- Content Script ↔ Background: Article data, settings
- Popup ↔ Background: Statistics, profile updates
Using chrome.storage.local for:
- User reading profile (speed, calibration)
- Reading statistics
- Feature settings
The next feature to implement is the Focus Highlighter:
-
Read the feature spec in
docs/reading_extension_features.md -
Key implementation points:
- Add paragraph click detection in content script
- Create overlay element for dimming
- Add focus icon next to selected paragraph
- Implement keyboard navigation (arrow keys)
- Add dimming intensity setting
-
Files to modify:
src/content/content.ts- Add focus mode logicsrc/styles/content.css- Add overlay/focus stylessrc/popup/popup.ts- Connect toggle
MIT License - see LICENSE file for details.
