Mercurial > ec-userscripts
changeset 93:5510cbaabcac
Add youtube shorts redirector
author | nanaya <me@nanaya.pro> |
---|---|
date | Tue, 20 Sep 2022 16:00:47 +0900 |
parents | ebca2e6df3cc |
children | a35ddabefd9d |
files | youtube-no-shorts.user.js |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/youtube-no-shorts.user.js Tue Sep 20 16:00:47 2022 +0900 @@ -0,0 +1,18 @@ +// ==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== + +// Source: https://gist.github.com/Ultrawipf/7af006d1b8f75eddd3222d1053c3a243 +(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=') +})()