code-charity / youtube

[top~1 open YouTube & Video browser-extension] - Enrich your experience & choice! 🧰180+ options & clever features 📌set+forget📌Longest-standing(been tough). Please join🧩us👨‍👩‍👧‍👧 ..⋮ {playback|content discovery|player|extra buttons|distractions|related videos|shorts|ads|quality|codec|full tab|full screen}
http://improvedtube.com
Other
3.52k stars 533 forks source link

Redirect Shorts to default player #1701

Open Harry-Dang opened 1 year ago

Harry-Dang commented 1 year ago

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
sapondanaisriwan commented 1 year ago
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);
}
raszpl commented 1 year ago

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

Termuellinator commented 1 year ago

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:

shivam-puri commented 1 year ago

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

Harry-Dang commented 1 year ago

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

ImprovedTube commented 8 months ago
  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

KaKi87 commented 7 months ago

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

ImprovedTube commented 7 months ago
  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 commented 5 months ago

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

ImprovedTube commented 5 months ago

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



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