Background

So I’ve been watching some YouTube Shorts recently. When you miss something in the video, you have to watch the whole video again to see the part a second time.

When you are on a Desktop computer, you can open a YouTube Shorts as a normal video by taking the video ID from the URL and pasting it into the “classic” format like this:

"https://www.youtube.com/shorts/a6NjHteDWto" for the YouTube Shorts view
"https://www.youtube.com/watch?v=a6NjHteDWto" for the classic YouTube Video view 

Doing this by hand every time is very tedious. To automate this step, I wrote a small program that can be saved into a bookmark in your browser. This is called a Bookmarklet.

Bookmark shortcut for YouTube Shorts (“Bookmarklet”)

After some quick researching and coding, I decided to implement the following one-liner:

javascript:location.href = "https://www.youtube.com/watch?v=" + location.href.split("/")[4]

My reasoning behind omitting checks (like being on YouTube or whether the URL actually contains a video ID) is that I’m being pragmatic here. It’s simply not worth for a use case this small.

How to add the Bookmarklet

Google Chrome

Create new bookmark
  1. Right-click on the bookmarks toolbar
  2. Click on “Add page…”
Change bookmark URL
  1. In the field Name, enter the name for your bookmark (e.g. YouTube Short to Video)
  2. In the field URL, enter the JavaScript text from above (i.e. javascript:location...)
  3. Click on “Save” to save your new bookmark
  4. Done!

Mozilla Firefox

Create new bookmark
  1. Right-click on the bookmarks toolbar
  2. Click on “Add Bookmark…”
Change bookmark URL
  1. In the field Name, enter the name for your bookmark (e.g. YouTube Short to Video)
  2. In the field URL, enter the JavaScript text from above (i.e. javascript:location...)
  3. Click on “Save” to save your new bookmark
  4. Done!

Afterword

I hope that this article and/or bookmarklet was useful for you. If you have any questions, feel free to contact me here.