Added Go to Channel button on Long Pressing Thumbnail - #493
Open
shourya-9 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds:
Adds a "Go to Channel" option to the long press menu on video tiles, appearing right below the existing "Add to Queue" button.
How it works:
When selected, it fetches the video's watch page to resolve the channel ID, then navigates directly to the channel using the existing browseEndpoint resolver.
Files changed:
mods/features/adblock.js - adds the menu item for videos that already have a long press menu
mods/ui/ytUI.js - adds the menu item for newly built long press menus
mods/resolveCommand.js - handles the GO_TO_CHANNEL action and adds the goToChannel() function
Planned follow-up (if this gets accepted):
I'm also planning a follow-up PR that adds a settings entry letting users configure which 4 items appear in the long press menu. "Play" would stay fixed as the first item since it's the primary action, but the other 3 slots would be user-configurable from the full list of available options (Save to Watch Later, Save to Playlist, Add to Queue, Go to Channel, and any future additions). This keeps the menu visually consistent at 4 items while giving users flexibility — people who use the queue can keep it, people who don't can swap it out for Go to Channel or something else.