NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name YouTube Redirect Shorts
// @namespace https://github.com/sapondanaisriwan/youtube-anti-shorts
// @match https://www.youtube.com/*
// @grant none
// @version 1.0.2
// @author sapondanaisriwan
// @description Redirects youtube shorts to the normal player
// @license MIT
// @run-at document-start
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @homepageURL https://github.com/sapondanaisriwan/youtube-anti-shorts
// @updateURL https://github.com/sapondanaisriwan/youtube-anti-shorts/raw/main/redirect-shorts.user.js
// @supportURL https://github.com/sapondanaisriwan/youtube-anti-shorts/issues
// ==/UserScript==
/*
If you want to submit a bug or request a feature please report via github issue. Since I receive so many emails, I can't reply to them all.
Contact: sapondanaisriwan@gmail.com
Support me: https://ko-fi.com/sapondanaisriwan
Support me: https://ko-fi.com/sapondanaisriwan
Support me: https://ko-fi.com/sapondanaisriwan
Support me: https://ko-fi.com/sapondanaisriwan
Support me: https://ko-fi.com/sapondanaisriwan
*/
"use strict";
function redirectToWatchPage() {
const { origin, pathname } = location;
const isShorts = pathname.startsWith("/shorts/");
const newURL = `${origin}${pathname.replace("shorts", "watch")}`;
isShorts && location.replace(newURL);
}
function run() {
redirectToWatchPage();
document.addEventListener("yt-navigate-start", redirectToWatchPage);
}
run();