Skip to content

Instantly share code, notes, and snippets.

@Ultrawipf
Created March 29, 2022 08:12
Show Gist options
  • Select an option

  • Save Ultrawipf/7af006d1b8f75eddd3222d1053c3a243 to your computer and use it in GitHub Desktop.

Select an option

Save Ultrawipf/7af006d1b8f75eddd3222d1053c3a243 to your computer and use it in GitHub Desktop.
Tampermonkey script to redirect all youtube shorts video links to normal video pages
// ==UserScript==
// @name Youtube shorts redirector
// @version 0.1
// @description Redirects all youtube shorts videos to normal video pages
// @author Ultrawipf
// @match https://*.youtube.com/shorts/*
// @icon https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Youtube_shorts_icon.svg/193px-Youtube_shorts_icon.svg.png
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// From https://www.youtube.com/shorts/xxxx to https://www.youtube.com/watch?v=xxxx
window.location = window.location.href.replace("youtube.com/shorts/", "youtube.com/watch?v=");
})();
@cacklouncle
Copy link

only works when we open short in new tab or paste the link not if we open in same tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment