Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect Shorts to default player #1701

Open
Harry-Dang opened this issue Jun 9, 2023 · 10 comments
Open

Redirect Shorts to default player #1701

Harry-Dang opened this issue Jun 9, 2023 · 10 comments
Assignees
Labels
Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* hacktoberfest-accepted help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) Solution exists (Here or 3rd party) Exists in any extension, userscript, webapp or app. Written in JS or not up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@Harry-Dang
Copy link

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 Harry-Dang added Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Jun 9, 2023
@sapondanaisriwan
Copy link
Contributor

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
Copy link
Contributor

raszpl commented Jun 13, 2023

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
Copy link
Contributor

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 👍

@shivam-puri
Copy link

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

@Harry-Dang
Copy link
Author

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
Copy link
Member

  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


#1233 (comment)

@ImprovedTube ImprovedTube added the 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) label Mar 20, 2024
@ImprovedTube ImprovedTube closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@KaKi87
Copy link

KaKi87 commented Mar 20, 2024

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

@ImprovedTube ImprovedTube reopened this Mar 20, 2024
@ImprovedTube ImprovedTube added hacktoberfest-accepted Solution exists (Here or 3rd party) Exists in any extension, userscript, webapp or app. Written in JS or not labels Mar 20, 2024
@ImprovedTube
Copy link
Member

  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
Copy link
Member

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

@ImprovedTube
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* hacktoberfest-accepted help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) Solution exists (Here or 3rd party) Exists in any extension, userscript, webapp or app. Written in JS or not up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
Status: No status
Development

No branches or pull requests

7 participants