New plugin: YT Links - clean, simple fix to common Youtube link pain points

This plugin was intended to solve a few very common Youtube link pain points simply and reliably without complicating my vault or creating new dependencies. Maybe it can help you.

  1. I wanted to be able to paste a clean video link into notes, without notification counts:

    • I have an extension set up to copy a Markdown link from my browser ([page title](url)]). (I happen to use Tab Copy, but you can set this up a variety of ways.)
    • I got annoyed that Youtube titles would capture the notifications count with it.
    • This plugin fixes that on paste: removes the notification count.
  2. Sometimes I wanted to just capture a single link to a timestamp in a video without a messy URL:

    • I would right-click in Youtube, choose “Copy video URL at current time”, but then when I pasted it into notes, it was just the raw URL. I wanted it to just be the time notation, linked to the video.
    • This plugin fixes that on paste: converts any timestamp URL into a simple Markdown-linked time notation (no title-fetching).
  3. Sometime a video title (especially Youtube shorts) would contaminate the tags in my vault:

    • Hashtags in the link title would become unwanted tags in my vault tag list without me even realizing it
    • This plugin fixes that on paste: it just surgically removes the hashtag symbol (or you can adjust settings to have the complete tag removed)
  4. Sometimes I wanted to just capture a Youtube video into my vault with linked timestamps.

    • I use Obsidian Web Clipper to capture a Youtube page. By default, it saves the video URL as the frontmatter property source. It also saves a transcript of the video, with time notations. Unlinked. Often the video description itself has chapter timestamps, but they also import into the note unlinked. I wanted all of those timestamps to be clickable.
    • This plugin fixes that with one command: it turns all the notations into Markdown links based on the source URL.
  5. Sometimes I wanted to take notes on a video from a note within my vault:

    • I messed around with various media plugins and wasn’t very happy: the setup is complex, I have to learn a whole new set of shortcuts to manage the player, sometimes they create artifacts or codeblocks in my notes that aren’t readable without the plugin, they mess up my tab layout, sometimes they create new folders, etc.
    • I wanted something simple: to watch the video in any vieweer I want (usually just in my browser alongside Obsidian, but it could even be on a different device entirely, or embedded in the note itself), write a timestamp, take a note: e.g. 1:23 - The funniest cat clip in this video and be done.
    • This plugin fixes that with one command: I run it when I’m done taking notes, and it converts all the time notations to clickable links based on the note source.
  6. Finally, sometimes I wanted to just linkify plain timestamps in a transcript of a video I already had.

    • This plugin fixes that with one command: run the command in the note (or any selection of the note) and the timestamps are now Markdown links, again based on the note source.

How to use it

  • For uses cases 1, 2 & 3: don’t do anything, just don’t disable the functions in the plugin settings. For hashtags, you can choose how they get handled (removed entirely, or just remove or replace the hashtag sign/octothorpe).

  • For use cases 4, 5 & 6: Make sure the note has the video URL in the property you’ve designated in settings (default is source, you can set your own). And then run the command “YT Links: Link time notations” and you’re done. It will link all time notations on the page. Assign it a hotkey if you want.

If you want to get fancy:

  • Convert just one time notation on its own: make sure your cursor is in that one notation when you run the command - it will only convert that one.
  • Convert just a selection: select the text with time notations you want to convert and run the command.
  • Note the command permanently edits the note, so the new Markdown links will remain whether the plugin is active or not. It also means you can run it on different notes that have the Youtube URL in different frontmatter properties - just update the settings to whichever property name you need for that note.

Disclaimer

  • It’s free, open source and on the community marketplace: YT links - Obsidian Plugin
  • It’s unapologetically vibe-coded, but with the following mitigations: it follows all Obsidian plugin standards as closely as possible, it does only a few very simple things (listening and editing) as cleanly as possible, and I took pains especially to make sure it’s a good plugin citizen and doesn’t interfere with any other plugins that listen to paste events. If you encounter any issues, let me know.

I hope this is helpful.

1 Like