Created
August 28, 2022 15:00
-
-
Save toth-dev/a8fe08336e2b69f01f96f78622cec89e to your computer and use it in GitHub Desktop.
Redirect from YouTube Short to regular player
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Redirect from YouTube Short to regular player | |
// @version 1 | |
// @namespace https://github.com/totpet | |
// @icon https://www.youtube.com/s/desktop/bafe163d/img/favicon_32x32.png | |
// | |
// @include /https:\/\/www.youtube.com\/shorts\/.........../ | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
let curr = window.location.toString(); | |
let match = curr.match(/^https:\/\/www.youtube.com\/shorts\/(...........)/); | |
if (match) { | |
window.location = 'https://www.youtube.com/v/' + match[1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment