3 ms·
I wrote a userscript that turns the links into a /v/ link. The whole "shorts" concept is sort of stupid. I mean the videos are fine, let people make whatever so
by somat 3y ago
I wrote a userscript that turns the links into a /v/ link. The whole "shorts" concept is sort of stupid. I mean the videos are fine, let people make whatever sort of video they want. the front page promotion is unwanted. But the thing I actively despise is the scrolling auto play interface. However youtube will play the video with a sane interface when the /short/ link is modified into /v/
Or I should say, I nearly wrote a userscript to do this, it mostly works but I still find myself manually changing urls. I am not good with JS.
- efilife 3y agoA little nitpick, it's ?v= not /v/
- Phiwise_ 3y agoI think both redirect to the video, no? At least I think they used to.
- somat 3y agoshorts have a link like youtube.com/shorts/XXXXXXX changing that to youtube.com/v/XXXXXXX works. and the video is still stupid, but now you have a sane environment to watch it in.
- efilife 3y agoI had no idea, thanks!
- brokenmachine 3y agoMy tampermonkey script (credit to the original author, I forget where I got it from): // ==UserScript== // @name Youtube shorts redirect // @namespace http://tampermonkey.net/ // @version 0.3 // @description Youtube shorts > watch redirect // @author // @match *://*.youtube.com/* // @icon https://www.google.com/s2/favicons?domain=youtube.com // @grant none // @run-at document-start // @license GNU GPLv2 // ==/UserScript== var oldHref = document.location.href; if (window.location.href.indexOf('youtube.com/shorts') > -1) { window.location.replace(window.location.toString().replace('/shorts/', '/watch?v=')); } window.onload = function() { var bodyList = document.querySelector("body") var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (oldHref != document.location.href) { oldHref = document.location.href; console.log('location changed!'); if (window.location.href.indexOf('youtube.com/shorts') > -1) { window.location.replace(window.location.toString().replace('/shorts/', '/watch?v=')); } } }); }); var config = { childList: true, subtree: true }; observer.observe(bodyList, config); };
- somat 3y agoFor completeness here is mine. I will try yours and see if it works better. // ==UserScript== // @name eat my shorts // @namespace http://tampermonkey.net/ // @version 0.1 // @description change links to youtube shorts to reguler site // @author jrs // @match https://www.youtube.com/* // @icon none // @grant none // ==/UserScript== (function() { 'use strict'; function eat_shorts() { const root = document; const shorts_re = /^\/shorts\/(.*)/; const ae = root.getElementsByTagName("a"); for (var i = 0; i < ae.length; i++) { const this_a = ae[i]; const short_match = shorts_re.exec(this_a.getAttribute("href") ); if (short_match) { this_a.setAttribute("href", "/v/" + short_match[1]); } } } const config = { attributes: false, childList: true, subtree: true } //timer resets every time the returned function is called function make_reset_timer(cb, timeout) { var timer = setTimeout(cb, timeout); function reset_timer(mutation_list, observer) { clearTimeout(timer); timer = setTimeout(cb, timeout); } return reset_timer; } const short_observer = new MutationObserver(make_reset_timer(eat_shorts, 10)); short_observer.observe(document, config); })();