One Click YouTube Transcripts — A Tiny Chrome Extension I Built For Myself

Published: 4 months ago - Updated: 3 months ago

1 minute - 146 Words

article 'One Click YouTube Transcripts — A Tiny Chrome Extension I Built For Myself' banner

Summary

My 3-Line Chrome Extension for YouTube Transcripts

Introduction

Lately, I kept finding myself copy-pasting transcripts from long YouTube videos.
Every time, it was the same 3 lines of code I had lying around.

So I thought… why not just make it a Chrome extension?

Now it’s one click, and I use it way more than I expected.

Built it mainly for myself, but if you’re someone who digs into long videos and needs transcripts — it might save you time too.

The Code

// click show transcript button
document. querySelector(
    'button [aria-label="Show transcript"]'
).click();

// Get the video transcript text
document . querySelector(
    ".ytd-transcript-segment-list-renderer#segments-container"
).innerText

Links


Here is the demo
desc

Add Comment

Conversations (0)

SHTB

Building digital experiences and sharing knowledge through code and creativity.

Sign up for our newsletter

Stay up to date with the latest news and articles.

© 2025 Shahryar Tayeb. All rights reserved.