Skip to content

About

Browse YouTube comments inline on music.youtube.com

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

image

ytm-comments

A Chrome extension that puts YouTube comments one click away on YouTube Music desktop.

A speech-bubble button shows up in the player bar. Click it and a drawer slides up with the comments of the track playing right now — on the player page, or anywhere else you browse while the music keeps going.

  • Top / Newest sorting, infinite scroll, threaded replies
  • Pinned comments, creator hearts, creator / verified / artist badges
  • Clickable timestamps (seek the track) and links
  • Long comments collapsed with "Read more"
  • Resizable drawer (drag the handle, the height is remembered), Esc to close
  • Works with both YT Music player bars (the 2026 redesign and the legacy one)
  • Works for songs and music videos alike
  • UI in 19 languages; comment dates follow your YT Music language

Read-only: you can't post or like — that would need real auth and isn't what this is for.

YouTube Music now also has a native Comments tab on the player page. This extension stays useful if you want comments without opening the player page, in a bigger reading view, or from the mini-player while browsing.

Install

Chrome Web Store

One click via the Chrome Web Store. Auto-updates, signed by Google. Works on Chrome, Brave, Vivaldi, Arc, and any other Chromium-based browser that talks to the CWS.

Manual install (Edge, Firefox, or skip the store)

Prebuilt zips: Releases (stable) or the latest CI run (bleeding edge, can break).

Chrome / Edge — unzip, open chrome://extensions (or edge://extensions), enable developer mode, click Load unpacked, point at the unzipped folder.

Firefox — open about:debugging#/runtime/this-firefox, click Load Temporary Add-on, pick the .zip directly. Note: removed when Firefox restarts. A permanent install requires a Mozilla-signed build, which this project doesn't have.

CI artifacts come wrapped in an extra GitHub zip, so you have to extract once to get the real ytm-comments-<version>-<browser>.zip, then extract that.

Then open any track on music.youtube.com and click the new icon.

Build it yourself

Node 18+ and pnpm.

git clone https://github.com/andronedev/ytm-comments.git
cd ytm-comments
pnpm install
pnpm dev                   # fresh Chrome profile + HMR
pnpm build                 # .output/chrome-mv3/, load unpacked
pnpm build:firefox         # .output/firefox-mv2/

How comments are fetched

No API key, no cookies. When the drawer opens, the extension POSTs to youtubei/v1/next with the plain WEB client (YT Music's own WEB_REMIX client doesn't return comments), first on music.youtube.com (same-origin), falling back to www.youtube.com (which allows music.youtube.com via CORS). Two calls per track: {videoId} to get the comments continuation token, then {continuation: token} for the first page.

The current track comes from ?v= on /watch, or from the embedded player's title link elsewhere (ignored while an ad plays). The videoId is the same string as on regular YouTube — no mapping.

Layout

  • entrypoints/ytm.content/ — content script, Vue root
  • components/ — drawer, comment list/card, replies, rich text, sort menu
  • composables/ — useNowPlaying, useComments, useReplies, usePlayerBarButton
  • lib/ — youtubeApi.ts, parsers, i18n.ts, types
  • public/_locales/ — translations, generated by pnpm locales from scripts/locales.py
  • scripts/e2e.mjs — end-to-end test (Playwright + real YT Music)

Testing

pnpm build
npx playwright install chromium   # once
pnpm e2e                          # both player bars, headless
HEADED=1 LAYOUT=wiz pnpm e2e      # watch the 2026 player bar run

The test loads the built extension in Chromium, plays a track, and checks the button, the drawer, pagination, replies, sorting, Esc, browsing away from the player page, and track changes.

The most fragile file is lib/parseComments.ts. YouTube reshapes the JSON paths a few times a year, so every hop is ?. chained.

Things that can break

  • YT Music changes its player bar markup. Placement rules live in LAYOUTS in composables/usePlayerBarButton.ts; add a new entry.
  • The hard-coded clientVersion in lib/youtubeApi.ts gets rejected. Bump it to the current INNERTUBE_CLIENT_VERSION of youtube.com.
  • Some tracks have comments turned off — the drawer says so.

License

MIT. See LICENSE.

Not affiliated with YouTube or Google. The endpoint this calls isn't a public API and can change without warning, at which point the parser breaks and the drawer shows "couldn't load" until I update it.

About

Browse YouTube comments inline on music.youtube.com

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages