Skip to content

Instantly share code, notes, and snippets.

@K4rakara
Last active July 18, 2023 12:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save K4rakara/250b5edd4d603c56498b1bdce1f2081d to your computer and use it in GitHub Desktop.
Shorts Begone!
// ==UserScript==
// @name Shorts Begone
// @namespace https://gist.github.com/K4rakara
// @description Forces YouTube Shorts to use the standard YouTube player.
// @icon data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' focusable='false' style='pointer-events: none; display: block; width: 100%25; height: 100%25;'%3E%3Cg%3E%3Cpath d='M17.77,10.32l-1.2-.5L18,9.06a3.74,3.74,0,0,0-3.5-6.62L6,6.94a3.74,3.74,0,0,0,.23,6.74l1.2.49L6,14.93a3.75,3.75,0,0,0,3.5,6.63l8.5-4.5a3.74,3.74,0,0,0-.23-6.74Z' fill='red'%3E%3C/path%3E%3Cpolygon points='10 14.65 15 12 10 9.35 10 14.65' fill='%23fff'%3E%3C/polygon%3E%3C/g%3E%3C/svg%3E
// @include https://www.youtube.com/shorts/*
// @include https://youtube.com/shorts/*
// @run-at document-start
// @version 1.0
// ==/UserScript==
location.href = location.href.replace(/\/shorts\/([a-z0-9\-\_]+)\/?$/i, (_, id) => `/watch?v=${id}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment