quietbyday39 downloadsClean YouTube links and timestamps: strip notification counts, make timestamp URLs readable, and link bare time notations to a note's source video.
An Obsidian plugin that makes YouTube links clean and useful — a companion to
the official Obsidian Web Clipper, which captures a video's URL into a source
property and a transcript full of unlinked time notations.
It does four things, each available as a command and (for functions 1, 2, and 4) on paste:
(58) from the
title of a YouTube Markdown link.[0:56](…?t=56).2:34 / 1:02:05 into a link into
the note's source video at that moment.#music in a YouTube
link title, so pasted video titles don't seed the vault with foreign tags.Each function can be toggled on or off.
A YouTube page title copied from the browser as a Markdown link often starts with a notification count:
[(62) Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster) - YouTube](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
becomes
[Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster) - YouTube](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
Only the leading count is removed — the other parenthesised parts of the title
((Official Video), (4K Remaster)) are kept. And only short counts (up to
three digits) are removed, so a title that genuinely starts with a year like
(2049) is left alone.
A YouTube URL with a timestamp becomes a readable link:
https://youtu.be/dQw4w9WgXcQ?list=RDdQw4w9WgXcQ&t=56
becomes
[0:56](https://youtu.be/dQw4w9WgXcQ?list=RDdQw4w9WgXcQ&t=56)
The time is read from t or start, in any of the forms YouTube accepts
(56, 56s, 1m30s, 1h2m3s). Under an hour the title is m:ss; an hour or
more, h:mm:ss.
Turns bare time notations in the note body into links into the note's source
video. The video URL is read from a frontmatter property (default source),
which may be a raw URL or a Markdown link:
source: https://youtu.be/dQw4w9WgXcQ
Then 2:34 becomes [2:34](https://youtu.be/dQw4w9WgXcQ?t=154).
Only valid clock times are linked (minutes and seconds 0–59), so scores like
75:68, one-digit forms like 1:5, and ISO datetimes are skipped. Notations
inside markup are linked while the markup is kept: **2:34** →
**[2:34](…)**. Nothing inside frontmatter, code, existing links, wikilinks,
or URLs is touched, and running a command twice never double-links.
If the source property is missing or isn't a YouTube URL, or no notations are found, the plugin tells you and stops.
Creators often pack hashtags into a video title. Copied into a note, they clutter the link and can seed your vault with foreign tags:
[Live at Montreux #jazz #live-set - YouTube](https://youtu.be/dQw4w9WgXcQ)
Two ways to handle them, chosen in settings:
# for a character of your
choice (default -, or leave the field empty to drop just the #), keeping
the word: #jazz → -jazz.#jazz and tidies the leftover
spacing.A hashtag is recognised the same way Obsidian recognises a tag: a # at the
start of the title or after a space, followed by letters, digits, _, -, or
/, with at least one letter. So #4k and #live-set are handled, while C#,
a purely numeric #2049, and a lone # are left alone.
Each command scopes its work to what you're pointing at, with more warning for bigger changes:
source).# (with a
character of your choice, default -) or remove the entire hashtag.BRAT installs and auto-updates in-development builds straight from a GitHub repo:
https://github.com/Quietbyday/obsidian-yt-linksTo update later, open BRAT and click Check for updates (or just restart Obsidian).
main.js with npm install then npm run build, or download
main.js and manifest.json from a release.main.js and manifest.json into
<Vault>/.obsidian/plugins/yt-links/.Maintenance release addressing the community-store audit. No user-facing
behavior changes: replaced the builtin-modules build dependency with Node's
native module.builtinModules, and tightened two any-typed reads (frontmatter
property lookup and saved-settings load) to satisfy the type checker.
First public release on the Obsidian community store. No functional changes from
0.3.0-beta — the four commands (strip notification count, readable timestamps,
link time notations, strip hashtags) and their paste/selection/cursor/whole-note
behavior are unchanged.
Fixes the strip-hashtags notice, which counted a link with several hashtags as just "1 hashtag". It now reports the number of links cleaned — e.g. "Cleaned 1 hashtagged link" — which is accurate however many hashtags a title holds.
Adds an opt-in Debug logging setting (off by default). When on, the paste handler logs to the developer console what it sees — including whether another plugin already handled the paste — which makes conflicts with other paste plugins easy to track down.
Adds strip hashtags (function 4): removes or defuses hashtags like #music
in a YouTube link title, using Obsidian's own tag rules so C# and years like
#2049 are left alone. Choose between replacing just the # (default -) or
removing the whole hashtag. Runs on paste alongside strip-count and as its own
command.
Initial beta. Three commands — strip notification count, readable timestamps, link time notations — each with the paste / selection / cursor / whole-note activation cascade. Region-aware safety (skips frontmatter, code, links, wikilinks, URLs), valid-clock-time checking, and idempotent conversions.