Block Shorts tab on YouTube channel pages#2802
Open
pannya70 wants to merge 1 commit intobrave:masterfrom
Open
Conversation
Adds yt-tab-shape:has-text(Shorts) rule to hide the Shorts navigation tab on YouTube channel pages. This prevents users from accessing Shorts content via channel navigation.
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.
Description
Adds a filter rule to block the Shorts tab on YouTube channel pages.
Changes
youtube.com##yt-tab-shape:has-text(Shorts)tobrave-lists/yt-shorts.txt(line 20)Motivation
Currently, the Shorts tab on YouTube channel pages (e.g.,
youtube.com/@username/shorts) is not blocked by the existing filter list. Users can still navigate to a channel's Shorts content via this tab.This is currently the case on both Desktop and Android. I haven't tested it on iOS but I am sure it will be the case there as well. Its pretty easy to replicate:
Implementation
The new rule follows the same pattern as other navigation blocking rules (lines 18-19) by using text-based matching with
:has-text(Shorts). This approach is more robust than positional selectors and will work regardless of tab order.Testing
brave://adblock/custom filtersNo more Shorts tab:

