Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: YouTube Shorts Redirector (github.com/adamenger)
55 points by donutpepperoni 4 months ago | hide | past | favorite | 50 comments
I am neurodivergent and noticed the Youtube Shorts format was hacking my brain to engage longer than I wanted. I wrote this quick extension to gain my time back. If you have suggestions for improvement, I'm all ears. Thank you :)



Note that YouTube Shorts are just normal YouTube videos on a different URL. This means you can take a link to a Shorts like https://www.youtube.com/shorts/<id> and change it to https://www.youtube.com/watch?v=<id>.

This way, you won't get the dreaded doomscroll interface, and you can also scrub through the video!


Ludicrous that they made such an openly user-hostile interface. Won't show you runtime, won't show you the clip author, just maximally entice the user to click so they get sucked into the infinite dopamine machine. Absolutely unconscionable.


They just copied TikTok.


They didn’t just copy tiktok, they made a poor version of it and jammed it into an existing app because they have a captive audience. I can uninstall tiktok, I can’t uninstall shorts.


Tip: you can click on any comment's date (e.g. 9 months ago) to automatically redirect to a standard Youtube video.


Plus adjust the volume! Really speaks to the modern state Google's in that they took out their own functionality to more closely clone TikTok, I assume. Paul Graham's got an old quote about what it indicated about Microsoft when they decided to clone Google's business, and it comes to mind every time I see those terrible and vertical thumbnails.


Wait, TikTok doesn't allow you to change the volume? That sure would explain the increase in blaring phones since they became popular with the idiocracy.

Thanks to others who pointed out that uBlock origin can permanently disable (as opposed to being annoyed every 30 days) shorts on YT, instant quality of life improvement.


Regular YouTube videos on mobile also don't allow you to change the volume separate to the phone's 'master volume'. I don't think this is a TikTok/YouTube specific thing - you just don't see separate volume sliders on mobile like you would on a video playing on desktop.


Nor would I to, to be honest. That’s not the convention for mobile. I’d probably be confused if it were there.


VLC on mobile at least lets you swipe to change the volume.


I was referring to desktop. Youtube shorts does not allow you to change the volume of the video on desktop, forcing you to open the volume dialog box and either turn down your whole computer or every window in your browser.


>That sure would explain the increase in blaring phones since they became popular with the idiocracy.

Oh, not at all. It's just that there's no in-app volume control, so they depend entirely on the phone's media volume. This is common in most mobile applications, I'd say. So all those people glued to their blaring phones are morons, to put it plainly.


Except I watch most yt on my roku or google tv chromecast.

No fix for those unless it can be done in my opnsense router, but then that would break everything in the house when I am the only one who really hates shorts.

And to think I pay for yt. And let's not even get started about the blank home screen for the crime of turning off history.


You can change the volume on your phone just like you can with anything else.


>Wait, TikTok doesn't allow you to change the volume?

Just a guess from Youtube's shorts not having it. I've never used it.


Even better, turn off your watch history and in a few months Shorts refuses to work :)


If you use uBlock Origin, you can also just hide them: https://github.com/gijsdev/ublock-hide-yt-shorts


Thanks, I manually hide them every thirty days because I didn't know that ublock origin can do that, and I didn't want to install an extra add-on just for that (because I hoped that YouTube would some day realise how bad shorts are, and give up on them; wishful thinking, I know).


> I manually hide them every thirty days

The inability of tech companies to accept that no means no, and not "bother me later" is a dark pattern that I've noticed more and more lately.


It seems to have gotten imbedded as 'just the way you ask users things' in UI developer's mindsets:

    Do you want to enable push notifications?

    [Yes please] [Later]
How about [No]? Just add a note that I can always enable this later if I want to, but don't jerk around with this nudging making me feel I'm just postponing this choice.


It's called dark patterns as GP mentioned. They're financially motivated to improve [Yes] clicks, so they just remove [No]. It's completely Web-legal and Web-ethical.

IMO, something should have been done when A/B tests became normal(mid to late 2000s). That ship had long long sailed, but I believe that alone require independent ethics board if it is happening outside the Web. It should not be something easily handled with a blanket waiver in shrinkwrap EULA.


As Louis Rossmann would say, Rapist mentality.


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.


My 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);
  };


For 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);
  })();


A little nitpick, it's ?v= not /v/


shorts 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.


I had no idea, thanks!


I think both redirect to the video, no? At least I think they used to.


I think Shorts are great. What is your issue with them?


Besides the obvious reason that is even stated in the original submission of this article (they way they are presented is made to hack your brain for the dopamine kick and keep scrolling infinitely), there are also the technical aspects (no scrub bar, no volume control, accidentally touch the mouse wheel and you skip to the next video) - and maybe more subjectively: Shorts are about the worst-quality YouTube content there is.


I just use a macro that changes the URL from "shorts" to "watch", thereby yielding a regular video player


I have an even more radical solution. Whenever I have to watch something on yt (because I was sent a link to it), I download the video using yt-dlp and watch the downloaded video. I never ever go on the website :-)


That's a good option, since it will make the whole experience much more intentional. Carefully selecting what you want to watch and committing to it without having the option to immediatelly skim through it before it's completely downloaded, or to frantically jump from video to video, without ads, nor stumbling upon comments, nor "suggested" videos, is certainly a good thing. You could always use any Invidious instance listed on https://invidio.us, though, if you have good impulse control and prefer streaming to downloading and watching offline.


You might enjoy my app (iOS only) to load and save the video and show you the transcript so you can only focus on that video https://www.appblit.com/scribe


This looks like a good app! I won’t have a use personally for it, but still looks good. How did you do the transcripts?


Neat!

There's also Redirector, which allows to do all kinds of redirects like this. For example, I use it to redirect from YouTube to Invidious or from Booking.com confirmation page to the variant without upsells (which are otherwise tricky to block with uBlock Origin).

http://einaregilsson.com/redirector/

My rules: https://gist.github.com/notpushkin/ee1ed3aa55a0926708d0de854...


Redirector is great, but unfortunately is no longer maintained because the author passed away[0].

[0] https://github.com/einaregilsson/Redirector/issues/329


There's a user script version of that here as well for mobile browsers. You need to install Tapermonkey first or Userscript app for Macintosh. https://greasyfork.org/en/scripts/439993-youtube-shorts-redi...


Shorts make me really mad. I use this Chrome extension to remove everything related to Shorts: https://chrome.google.com/webstore/detail/hide-youtube-short...


I think these short form videos will hurt us in the long run. Thank you for sharing this.


I use a very manual mode on Safari (my default browser) - once very month, I click the "X" besides the Shorts Carousal and it works until the next time, then I repeat.

Disclaimer: I'm not that into YouTube and kinda 'lucky-priced' to be in a region-discounted part of the world.


Youtube lite is also a time saving alternative worth to check. The only down side is you have to have your own api keys though.

- https://youtube-lite.js.org


Is there a way to get an RSS feed for a Youtube channel which excludes shorts?


Thankfully when the channels whose RSS I am subscribed to posts a YouTube short, they are kind enough to add hashtags all over the place. It's practically muscle memory now to mark any entry with a hashtag as red without checking


I use wrapper RSS that adds 3 autogenerated thumbnails from which you see that it is short (because of the black boxes) and you can skip it. You can maybe analyze pixels of those thumbnails.


I found now that Piped includes duration in the RSS so might script around that. Wonder if Invidious could add that metadata too.

https://github.com/TeamPiped/Piped/wiki/Instances


Nice, already installed on my chrome, thanks


[flagged]


You know, you don't _have_ to use this free entertainment website if it makes you so angry.


Overreaction indeed but sometimes you need to grant access to YouTube to your kids for study purposes but don't want them to look at shorts. YouTube doesn't allow this in a straight forward manner. I didn't see any settings in Google's family link app even though the app is mainly designed to control access for kids.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: