Skip to content
Anmol1578Public

About

πŸ“Έ A Extension That Snip & copy text from YouTube videos in one click β€” powered by Tesseract.js OCR, runs 100% locally.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

3 Commits

Folders and files

Repository files navigation

πŸ“Έ SnapText

Video Text Grabber for YouTube

Snip any region of a YouTube video and instantly copy the text inside it β€” code, subtitles, captions, anything on screen.

Manifest V3 Tesseract.js License: ISC Version


✨ Features

πŸ–±οΈ Select-and-snip Draw a box over any part of a YouTube video to capture text from that region
🎯 High-accuracy OCR Powered by Tesseract.js, with preprocessing (upscaling, contrast stretching, dark-mode inversion) tuned for video frames
πŸ”’ Runs entirely in-browser OCR happens locally via a Web Worker β€” no server calls, no data leaves your machine
πŸ“‹ Instant clipboard copy Extracted text is copied automatically, with a toast preview
πŸͺΆ Lightweight Manifest V3 extension with a minimal permission footprint (offscreen only)

πŸš€ Installation

Since this extension isn't published on the Chrome Web Store yet, install it manually:

  1. Clone the repository
    git clone https://github.com/Anmol1578/Snap-Text.git
  2. Open Chrome and go to chrome://extensions
  3. Enable Developer mode (top-right toggle)
  4. Click Load unpacked and select the Snap-Text folder
  5. The SnapText icon will appear in your extensions toolbar

🎬 Usage

  1. Open any video on youtube.com
  2. Click the Select area button that appears on the player
  3. Draw a box around the text you want to capture
  4. The text is OCR'd and copied to your clipboard automatically βœ…

πŸ› οΈ Tech Stack

  • JavaScript β€” Manifest V3 Chrome Extension
  • Tesseract.js β€” in-browser OCR engine
  • Offscreen Documents API β€” runs OCR in a Web Worker, isolated from YouTube's page CSP

πŸ“ Project Structure

Snap-Text/
β”œβ”€β”€ manifest.json     # Extension configuration (MV3)
β”œβ”€β”€ content.js         # Injected into YouTube β€” handles area selection & capture
β”œβ”€β”€ content.css         # Styling for the selection overlay and toasts
β”œβ”€β”€ background.js      # Service worker β€” relays OCR requests to the offscreen doc
β”œβ”€β”€ offscreen.js        # Runs Tesseract.js OCR in a Web Worker
β”œβ”€β”€ offscreen.html
β”œβ”€β”€ icons/
└── vendor/             # Bundled Tesseract.js core + language data

πŸ“„ License

Licensed under the ISC License.

Made with β˜• by Anmol1578

About

πŸ“Έ A Extension That Snip & copy text from YouTube videos in one click β€” powered by Tesseract.js OCR, runs 100% locally.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages