Turn every new tab into a small moment of calm with curated quotes. katahari is a lightweight, offline-first browser extension built with vanilla JavaScript that shows a random quote whenever you open a New Tab.
βA little quote, a brighter day.β
- New Tab Quotes β Random quotes on each new tab (
newtab.html) β works fully offline. - Local Curation β Quotes are stored in
database/quotesfor speed, privacy, and easy editing. - Lightweight & Offline-First β Pure HTML / CSS / JS. No server required.
- Accessible β Keyboard-focusable controls and ARIA attributes on interactive elements.
- Developer-Friendly β Small codebase to extend (themes, contact panel, star background variants).
- Vanilla JavaScript
- HTML + CSS
- Chrome Extension Manifest V3 (
manifest.json:1)
newtab.htmlβ The New Tab UI and entrypoint.css/main.cssβ All styles, theme tokens and the lightweight CSS starfield fallback.vendor/main.jsβ App logic (themes, quotes, UI handlers).vendor/star.jsβ Canvas starfield (now optimized); you can swap this for the SVG/CSS alternatives.database/quotes/β Quote files (organized per category).manifest.jsonβ Extension configuration.background.jsβ Background script (if used by the extension).
Follow these steps to get the project running for the first time (recommended):
Quick start (recommended for development)
- Install dependencies (optional β only needed for the local http-server dev helper):
- npm install
- Build the JSON quotes bundle (required the first time and whenever you edit files under
database/quotes/):- npm run build
This runs
scripts/build-quotes-json.mjsand produces: database/quotes/quotes.jsondatabase/quotes/quotes.byfile.json
- npm run build
This runs
- Start a local preview server:
- npm run start By default this serves the project at http://localhost:8080
- Open the preview page in your browser:
Load as an unpacked Chrome (or Chromium) extension
- Build the quotes bundle (see step 2) so the extension can use the JSON fallback.
- Open your browser and go to chrome://extensions
- Enable "Developer mode"
- Click "Load unpacked" and select the project root folder
- Open a new tab (or chrome-extension://[your-extension-id]/newtab.html) to preview the extension
Alternative quick preview methods
- Python:
python3 -m http.server 8000then open http://localhost:8000/newtab.html - Node (no install):
npx http-server -p 8000then open http://localhost:8000/newtab.html
Useful scripts (see package.json)
- npm run build β build JSON from JS quote modules (needed initially / after edits)
- npm run start β run a local http-server for preview
- npm run pack β create katahari.zip for distribution
Notes
- When using a local HTTP server (non-extension mode) some extension-only APIs will not be available, but the UI and styling will render for development and testing.
- If you change quote source modules under
database/quotes/, re-runnpm run buildto regenerate the JSON files used by the loader. - For theme or UI testing, open the devtools console to inspect messages from
vendor/main.js.
This project supports a few background approaches (choose whichever best fits your performance needs):
- Canvas (default historical approach) β
vendor/star.js. It can be resource-intensive on some devices. The file in this repo has been optimized with capped DPR, offscreen pre-rendering and lower particle counts to reduce CPU/GPU work. - SVG (inline) β lightweight, scalable, accessible; minimal JS required. See
newtab.htmlfor an inline SVG starfield example. - Pure CSS (fallback) β uses layered radial-gradients and repeating patterns in
css/main.cssfor the lowest runtime cost (no JS).
Recommendation: For best performance on low-end devices, use the CSS option or the optimized canvas with DPR cap enabled.
- Quotes live under
database/quotes. Add or edit category files to change content. - Themes and user preferences are handled in
vendor/main.jsand persisted to chrome.storage-like helpers (vendor/chromeStorageHelper.js:1). - If you change
vendor/star.jsand want to test instantly, reload the extension in chrome://extensions or refresh the open new tab page.
Contributions welcome. Suggested workflow:
- Fork the repo.
- Create a feature branch (e.g.
feat/add-theme). - Open a pull request with a clear description and screenshots if applicable.
Please follow the existing code style (vanilla JS, minimal dependencies).
- License: MIT (add LICENSE file if you want to publish this project).
- Contact: ahmadyudafahrudin@gmail.com or see the Contact panel in
newtab.html.