DEV Community

Cover image for I was tired of manually copying YouTube transcripts, so I built a 15KB Firefox extension
Pawan Hirumina
Pawan Hirumina

Posted on

I was tired of manually copying YouTube transcripts, so I built a 15KB Firefox extension

If you use YouTube for learning, research, or building AI tools, you know this pain:

Open transcript panel -> Scroll -> Select all -> Try not to copy the whole page -> Paste into notes -> Fix formatting.

I do this 10 times a day. So I built yt-transcript-yoinker.

It's a tiny Firefox add-on that adds a single "Copy Transcript" button right into the YouTube UI. One click, entire transcript in your clipboard. No account, no external API, no data leaving your machine.

GitHub: https://github.com/pawanhirumina/yt-transcript-yoinker
Install from AMO: https://addons.mozilla.org/en-US/firefox/addon/yt-transcript-yoinker/

The Problem

I needed transcripts for:

  • My own study notes
  • Summarizing lectures with LLMs
  • Creating subtitles / documentation

Every existing tool either:

  1. Required you to paste the YouTube link into some shady website
  2. Sent your data to a server
  3. Was a bloated extension asking for permissions to read ALL your data

I wanted something that just works, locally.

What it does

  • One-click copy: Adds a button next to the video title/description
  • Smart: Only shows up if the video actually has a transcript
  • Private: Everything happens in your browser. No fetch(), no backend. Your watch history never leaves your device.
  • Lightweight: < 15 KB packed. No frameworks, just vanilla JS + WebExtension APIs
  • Open Source: MIT licensed, auditable in 2 minutes

How it works under the hood

Super simple, no magic.

  1. Content script listens for YouTube navigation (YouTube is an SPA, so I listen to yt-navigate-finish)
  2. Checks if the transcript endpoint exists for that video ID
  3. Injects a button into the DOM
  4. On click, it fetches YouTube's own transcript data (the same JSON the official transcript panel uses) and formats it to plain text with timestamps
  5. Uses navigator.clipboard.writeText()

No background server. The whole thing is ~100 lines of JS.

Stack: HTML, CSS, Vanilla JavaScript (WebExtension APIs)

Why Firefox first?

I live in Firefox. And Mozilla's review process for add-ons is actually strict about privacy, which I like for a tool like this. Chrome version is on the roadmap - if you want to help port it, PRs are welcome!

Installation

For users:

  1. Go to https://addons.mozilla.org/en-US/firefox/addon/yt-transcript-yoinker/
  2. Add to Firefox. Done.

For devs:


bash
git clone https://github.com/pawanhirumina/yt-transcript-yoinker.git
# Then in Firefox: about:debugging#/runtime/this-firefox -> Load Temporary Add-on -> manifest.json
Enter fullscreen mode Exit fullscreen mode

Top comments (0)