Get URL to Invidious from video on YouTube, directly from your bookmarks tab
Published on 2023-01-05 · JavaScript ProgrammingIf you are currently watching video on YouTube and want to get a shareable link to not-so-spying Invidious instance, there is a very simple solution, that can live rent free in your bookmarks tab.
In my case, I use Firefox, I put this piece of code into “URL” input of the bookmark1:
javascript:navigator.clipboard.writeText(`https://yewtu.be/watch?v=${window.location.search.split("&")[0].slice(3)}`)
In result, privacy friendly link is saved directly in your clipboard, ready to be shared with your friends and other people.
This JavaScript bookmark can be altered and used for other websites, e.g. for creating links redirecting to Nitter, where you can see tweets from Birdsite.
Please let me know in the comments if this solutions works for you on Chromium-based and Safari browsers.
Sources:
- Invidious logo used in thumbnail, licensed on CC0-1.0 license