8000 GitHub - dht/readit · GitHub
[go: up one dir, main page]

Skip to content
dhtPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

ReadIt — Browser Text-to-Speech Extension

ReadIt is a Manifest V3 Chrome extension that reads any web page aloud using your browser's built-in speech engine. No accounts, no cloud, no tracking.

ReadIt popup


Features

  • One-click reading — extracts the main article body and reads it aloud
  • Smart extraction — skips navigation, footers, cookie banners, ads, and inline links; prefers semantic landmarks (<main>, <article>)
  • Paragraph navigation — Prev / Next buttons to jump between paragraphs while reading
  • Live highlight — the paragraph currently being read is outlined on the page and scrolled into view
  • Selection mode — highlight any text on a page and ReadIt reads only that
  • Language detection — auto-detects English, Hebrew, or mixed content and selects an appropriate voice automatically
  • Stats panel — shows paragraph count, character count, estimated reading time, current position, and a progress bar
  • Text preview — see the first few paragraphs before pressing Play
  • Adjustable speed & pitch — 0.5× to 2.5×, saved between sessions
  • Voice selector — choose any voice installed in your OS

Installation

From source (developer mode)

  1. Clone or download this repository
  2. Open Chrome and go to chrome://extensions
  3. Enable Developer mode (toggle in the top-right corner)
  4. Click Load unpacked and select the project folder
  5. The ReadIt icon appears in your Chrome toolbar

Requirements

  • Google Chrome 88+ (or any Chromium-based browser supporting Manifest V3)
  • No external dependencies — everything runs in the browser

Usage

Action How
Read the page Click the ReadIt icon → press Read
Read a selection Highlight text on the page → open ReadIt → press Read
Pause / stop Press Stop
Skip forward Press Next (active while reading)
Go back Press Prev (active while reading)
Adjust speed Move the Speed slider (0.5× – 2.5×)
Change voice Select from the Voice dropdown

File Structure

readit/
  manifest.json        Chrome extension manifest (MV3)
  popup.html           Extension popup UI
  popup.js             Popup logic — settings, transport, stats
  content.js           Content script — text extraction, speech, highlight
  icons/
    icon16.png
    icon48.png
    icon128.png
    icon.svg           Source SVG for icon generation
  imgs/
    example.png        Screenshot used in this README
  how-to-create.txt    Prompt guide for regenerating this extension with AI
  LICENSE
  README.md

How it works

  1. Extraction — content.js walks the DOM from the best semantic root (main, article, etc.), collecting text from block-level elements while skipping boilerplate identified by tag name, ARIA role, class, and ID patterns.

  2. Language detection — Character code-point counting distinguishes Hebrew (U+0590–05FF, U+FB1D–FB4E) from Latin text and returns en, he, or mixed.

  3. Speech — Text is split into ≤220-character sentence chunks to stay within browser limits and make Stop feel instant. Each chunk is a SpeechSynthesisUtterance; a generation counter prevents stale callbacks from advancing the cursor after a skip.

  4. Popup ↔ content communication — The popup sends messages (read, stop, prev, next, stats, getState) to the content script. The content script sends progress and done events back. On popup open, getState reconciles button state with whatever is currently playing.


Regenerating with AI

See how-to-create.txt for the full prompt guide used to generate this extension. Each file has its own prompt section with detailed specifications.


Contributing

Pull requests are welcome. Please keep changes focused — one feature or fix per PR. The project has no build step; everything runs directly from source.


License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0