Focus is a Chrome Extension built on Manifest V3 that empowers readers to look up word definitions instantly β directly within the page. No context switching, no new tabs. Just highlight a word, get the definition, and keep reading.
Philosophy: Minimum Distraction. Maximum Context.
- π Inline Definitions β Highlight any word to reveal an elegant floating definition card, rendered directly on the page.
- β‘ Local-First Lookup β Uses a bundled Webster-based
dictionary_compact.jsonloaded into IndexedDB for near-instant lookups β no internet required. - π API Fallback β Automatically queries the Free Dictionary API for words not found in the local store.
- π§ Smart Caching β An in-memory cache layer sits on top of IndexedDB to eliminate redundant disk reads during a session.
- π¨ Glassmorphic UI β A polished, dark-mode aware popup and definition card with smooth animations.
- π Privacy-First β All local lookups are fully offline. No user data is ever transmitted unless an API fallback is triggered.
- βοΈ Settings Popup β A dedicated popup UI accessible from the Chrome toolbar for extension controls.
β This repository includes a ready-to-use
dist/folder for quick install without any build steps.
The following screenshots walk you through the full experience.
- Direct
dist/folder download: Downloaddistfolder - If that link is blocked in your network, download the repo ZIP and use its
dist/folder.
- Download or clone this repository
- Open Chrome and go to
chrome://extensions - Enable Developer Mode (top-right toggle)
- Click "Load unpacked"
- Select the
dist/folder from this repository
β You can use the extension immediately. No Node.js, npm, or build step required.
git clone https://github.com/<your-username>/focus-extension.git
cd focus-extension
npm installnpm run buildThis uses tsc + Vite to compile TypeScript and bundle all three entry points (popup, background, content) into the dist/ folder.
- Open Chrome and go to
chrome://extensions - Enable Developer Mode (top-right toggle)
- Click "Load unpacked"
- Select the
dist/folder inside the project root
β The extension will now appear in your toolbar and be active on all pages.
npm run devNote: Vite's dev server powers the popup UI. For content script and background changes, you must rebuild and reload the extension in Chrome manually.
| Layer | Technology |
|---|---|
| Build Tool | Vite 8.x |
| Language | TypeScript 5.9 |
| UI Framework | React 19 |
| Styling | Tailwind CSS 4.x |
| Extension API | Chrome Manifest V3 |
| Local Data | IndexedDB + In-Memory Cache |
| Dictionary Source | Webster's English (Compact JSON) + dictionaryapi.dev |
focus/
βββ public/
β βββ manifest.json # Chrome Extension manifest (MV3)
β βββ dictionary_compact.json # Bundled Webster's dictionary (~22MB)
β βββ favicon.svg
β βββ icons.svg
βββ src/
β βββ background.ts # Service Worker: dictionary load, lookup, API fallback
β βββ content.tsx # Content Script: highlight detection, definition card UI
β βββ App.tsx # Popup UI: settings and status
β βββ main.tsx # Popup entry point
β βββ index.css # Global styles
βββ images/ # Step-by-step screenshots
βββ index.html # Popup HTML entry
βββ vite.config.ts # Multi-entry Vite configuration
βββ package.json
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later) β see the LICENSE.md file for details.
Dictionary data and related resources are credited to the following sources:
- Matthew Reagan β WebstersEnglishDictionary
- Project Gutenberg β gutenberg.org
- Adam Isaacs β adambom/dictionary
Focus uses bundled Webster-derived local dictionary data as the primary source, and the Free Dictionary API as a secondary fallback for terms not present in local storage.




