YTMDesktop2
Features

Browser userscript

Open ytmd:// from music.youtube.com / youtube.com via Tampermonkey

The YTMDesktop Open Links userscript soft-opens actionable YouTube Music / YouTube / youtu.be pages in the desktop app via ytmd:// when you load or SPA-navigate to them.

It does not intercept link clicks — browsing in the tab stays normal.

Install

  1. Install Tampermonkey or Violentmonkey.
  2. Build the script from the monorepo:
pnpm userscript:build
  1. Open packages/userscript/dist/ytmdesktop-userscript.user.js in the browser and confirm install.

Matched hosts: music.youtube.com, youtube.com, m.youtube.com, youtu.be.

YTMDesktop2 must be installed (or the ytmd:// protocol registered) so the OS hands the URL to the app.

Behavior

EventAction
Page load / SPA navigateIf that host setting is on and the URL is actionable, soft-open ytmd://… (tab stays)
Link clickUnchanged — browser follows https as usual

Actionable paths: watch (?v=), playlist (?list=), channel (/channel/UC…), @handle, /shorts/…, /embed/…, and youtu.be /{videoId}. Home, search, and browse are skipped.

Transform is the same address-bar trick as shared links: https://ytmd:// on convertible hosts.

Tampermonkey menu

Open the Tampermonkey / Violentmonkey menu on a matched page:

CommandDefaultEffect
YTMDesktop: music.youtube.com — ON/OFFONAuto-open on load/navigate for Music
YTMDesktop: youtube.com — ON/OFFOFFAuto-open for youtube.com / www
YTMDesktop: m.youtube.com — ON/OFFOFFAuto-open for mobile YouTube
YTMDesktop: youtu.be — ON/OFFOFFAuto-open for short links
YTMDesktop: Open this page nowOpen current URL as ytmd:// (ignores host toggles)

Settings persist via GM_setValue.

Develop

pnpm userscript:dev

See packages/userscript/README.md in the repo.

On this page