youtube icon indicating copy to clipboard operation
youtube copied to clipboard

Redirect Shorts to default player

Open Harry-Dang opened this issue 2 years ago • 10 comments

PROBLEM: The Shorts player (/shorts/id) has poor UX, especially when compared to the default player (/watch?v=id). You cannot adjust the volume, scrub through the video, etc. People dislike the Shorts player because it is different from the default player

SOLUTION:
Add an option to automatically redirect from the Shorts player to the default player

ALTERNATIVES: Add a volume slider and the ability to scrub through the Short on the Shorts player

RELEVANCE / SCOPE: People generally dislike Shorts. If the player uses the default player, more people may want to watch Shorts more often

"SIDE EFFECTS":
People who generally dislike Shorts as a whole or do not mind the Shorts player may be annoyed by this feature

CONTEXT: If this is a feature that people are interested in, I would be interested in implementing it

SHORT Table (Summary)
Problem The Shorts player has poor UX
Solution Redirect Shorts to the default player
Alternatives Add more functionality to the Shorts player
Scope People dislike Shorts, by having it closer to the usual UX, people may watch more Shorts
Side effects People who dislike Shorts or do not mind Shorts may dislike this feature
Context

Harry-Dang avatar Jun 09 '23 19:06 Harry-Dang

function redirectToWatchPage() {
  const { origin, pathname } = location;
  const isShorts = pathname.startsWith("/shorts/");
  const newURL = `${origin}${pathname.replace("shorts", "watch")}`;
  isShorts && location.replace(newURL);
}
 
function run() {
  redirectToWatchPage();
  document.addEventListener("yt-navigate-start", redirectToWatchPage);
}

sapondanaisriwan avatar Jun 10 '23 05:06 sapondanaisriwan

yesss personally I use this userscript

  document.addEventListener('DOMSubtreeModified', function (e){
.....
    } else if (event.target.tagName && (event.target.tagName == 'YT-HORIZONTAL-LIST-RENDERER' || event.target.tagName == 'YTD-SECTION-LIST-RENDERER'
                                        || event.target.tagName == 'YTD-ITEM-SECTION-RENDERER' || event.target.tagName == 'YTD-THUMBNAIL')
               && event.target.querySelector('.ytd-thumbnail a[href^="/shorts/"], .ytd-reel-item-renderer a[href^="/shorts/"], .ytd-compact-video-renderer a[href^="/shorts/"], ytd-grid-video-renderer a[href^="/shorts/"]')) {
      Array.from( event.target.querySelectorAll('a[href^="/shorts/"]')).forEach(el => {
        el.href=el.href.replace('/shorts/','/watch?v=')
      })
    }

to overwrite shorts links instead of redirecting after the fact

raszpl avatar Jun 13 '23 20:06 raszpl

I use https://github.com/einaregilsson/Redirector for that - but in general i'd say there probably are enough users that would only need it for YT-shorts to warrant implementing it here :+1:

Termuellinator avatar Jun 20 '23 09:06 Termuellinator

Hey is this issue still open? Can i work on it??

shivam-puri avatar Jul 17 '23 11:07 shivam-puri

I'm going to start working on this issue now.

I was wondering if anyone has any opinions on whether it should be redirecting from Shorts or overwriting Shorts links? The latter would probably have a smoother experience, but it won't work if you click on a Shorts link from outside of Youtube such as Discord

My plan is to implement both as separate switches so the user can decide which they prefer

Harry-Dang avatar Aug 24 '23 20:08 Harry-Dang

  1. https://github.com/doma-itachi/Youtube-shorts-block MIT license & 50 000+ users👍
    @doma-itachi join us?😳☀️

#1383 #1146 (#1168 #1389 #1391)


  1. hiding shorts everywhere: https://github.com/ProbablyRaging/hide-youtube-shorts
    (store version requires browser history access...?)

  2. hiding shorts on the homepage: https://chrome.google.com/webstore/detail/no-youtube-shorts/hjfkenebldkfgibelglepinlabpjfbll


https://github.com/code-charity/youtube/issues/1233#issuecomment-1140619890

ImprovedTube avatar Mar 06 '24 15:03 ImprovedTube

All issues pretaining to this matter are now closed. What's going on ? Thanks

KaKi87 avatar Mar 20 '24 10:03 KaKi87

  1. hiding shorts everywhere: https://github.com/ProbablyRaging/hide-youtube-shorts
    (store version requires browser history access...?)

  2. hiding shorts on the homepage: https://chrome.google.com/webstore/detail/no-youtube-shorts/hjfkenebldkfgibelglepinlabpjfbll

Time to tag @benlad @ProbablyRaging too 👋 since we long started implementing such independently, further inflating maintenance among the sum of us volunteers. Check #1881 for some: "If we work on this at all, lets work together"

ImprovedTube avatar Mar 20 '24 11:03 ImprovedTube

hi @ProbablyRaging! :) oh no, i didnt see it is archived already (Imagine how many times i have experienced this over the years)

ImprovedTube avatar May 16 '24 01:05 ImprovedTube

I disagree with link modification ... externally shared links .. global ... memory .. A LOT

hi! @codefaux edit / just consolidating the threads(@raszpl )



For URL Forwarding:
We can / could ..:

Observe navigation: navigation.addEventListener('navigate', () => { ... });


Observe changes to document.location.href ( #2276 )


Run forwarding through Browser API (in a "background.js" / "worker.js"): declarativeNetRequest like adblockers ( while onBeforeRequest is restricted & manifest3 is enforced )


** Run an content script** only for youtube.com/shorts

  • This should consume fewer cpu cycles than a user script. (Besides I don't know how the Userscript managers do it)
chrome.storage.local.get('no_shorts_player', function (result) {    if (result.no_shorts_player === true) {  
...redirect... (no need to window.stop;) 
}});    

& in manifest.json:

"content_scripts": [
  { "......" }
  { "js": [	"js&css/extension/www.youtube.com/redirectshorts.js"],
	"matches": [	"https://www.youtube.com/shorts"],
	"run_at": "document_start"
 }



Compare: https://github.com/ynshung/better-yt-shorts

ImprovedTube avatar May 16 '24 13:05 ImprovedTube