comparison youtube-no-shorts.user.js @ 117:d9dc190bccaf

Undo combining fixes into single script per site
author nanaya <me@nanaya.net>
date Sun, 15 Jan 2023 23:49:35 +0900
parents ef21ef445fc6
children 8de2d53a4cb1
comparison
equal deleted inserted replaced
116:0e108a9dc6d7 117:d9dc190bccaf
10 // ==/UserScript== 10 // ==/UserScript==
11 11
12 'use strict'; 12 'use strict';
13 13
14 // Source: https://gist.github.com/Ultrawipf/7af006d1b8f75eddd3222d1053c3a243 14 // Source: https://gist.github.com/Ultrawipf/7af006d1b8f75eddd3222d1053c3a243
15 function shortDirect () { 15 // From https://www.youtube.com/shorts/xxxx to https://www.youtube.com/watch?v=xxxx
16 // From https://www.youtube.com/shorts/xxxx to https://www.youtube.com/watch?v=xxxx 16 window.location = window.location.href.replace('youtube.com/shorts/', 'youtube.com/watch?v=');
17 window.location = window.location.href.replace('youtube.com/shorts/', 'youtube.com/watch?v=');
18 }
19
20 shortDirect();