Skip to content

"Fix hide Shorts everywhere by removing new Shorts feed nodes"#3618

Draft
anosvoldi883 wants to merge 2 commits intocode-charity:masterfrom
anosvoldi883:master
Draft

"Fix hide Shorts everywhere by removing new Shorts feed nodes"#3618
anosvoldi883 wants to merge 2 commits intocode-charity:masterfrom
anosvoldi883:master

Conversation

@anosvoldi883
Copy link

What was broken

"Hide Shorts everywhere" no longer removed Shorts from Home, Subscriptions, Search, or Channel feeds.
YouTube changed how Shorts are rendered in the feed, so existing logic no longer matched.

What this PR does

Adds early removal of Shorts feed nodes when the setting is enabled by detecting:

  • YTD-REEL-ITEM-RENDERER
  • YTD-RICH-GRID-SLIM-MEDIA
  • YTD-RICH-SHELF-RENDERER

The removal happens inside ytElementsHandler, ensuring all feed contexts are covered.

How it was tested

  • Loaded extension unpacked in Chrome
  • Enabled "Hide Shorts on the home page"
  • Verified Shorts are removed from:
    • Home
    • Subscriptions
    • Search results
    • Channel pages

Scope

Minimal change, no behavior change when the setting is disabled.

@ImprovedTube ImprovedTube marked this pull request as draft February 16, 2026 01:09
@ImprovedTube
Copy link
Member

Hi @anosvoldi883 thanks!

ImprovedTube.storage.hide_shorts_everywhere === true

we don't have this toggle yet. you can add it in the menu.
or update the existing features:

# REMOVE HOMEPAGE SHORTS
--------------------------------------------------------------*/
html[it-pathname='/'][it-remove-home-page-shorts="true"] ytd-rich-section-renderer:has(ytd-rich-grid-slim-media[is-short]),
html[it-pathname='/feed/subscriptions'][it-remove-subscriptions-shorts="true"] ytd-rich-section-renderer:has(ytd-rich-grid-slim-media[is-short]),
/*are the two lines above outdated?*/
html[it-pathname='/'][it-remove-home-page-shorts="true"] ytd-rich-section-renderer:has(ytd-rich-shelf-renderer[is-shorts]),
html[it-pathname='/feed/subscriptions'][it-remove-subscriptions-shorts="true"] ytd-rich-section-renderer:has(ytd-rich-shelf-renderer[is-shorts]),
html[it-pathname='/feed/subscriptions'][it-remove-subscriptions-shorts="true"] ytd-item-section-renderer:has(a[href="/feed/subscriptions/shorts"]),
html[it-pathname='/feed/history'][it-remove-history-shorts="true"] ytd-reel-shelf-renderer,
html[it-pathname='/feed/trending'][it-remove-trending-shorts="true"] ytd-reel-shelf-renderer,
html[it-pathname='/feed/trending'][it-remove-trending-shorts="true"] ytd-video-renderer:has(ytd-thumbnail-overlay-time-status-renderer[overlay-style="SHORTS"]),
html[it-pathname='/feed/history'][it-remove-history-shorts="true"] ytd-video-renderer:has(ytd-thumbnail-overlay-time-status-renderer[overlay-style="SHORTS"]),
/*--------------------------------------------------------------
# REMOVE PLAYABLES
--------------------------------------------------------------*/
html[it-pathname='/'][it-remove-playables="true"] ytd-rich-section-renderer:has(ytd-mini-game-card-view-model) {
display: none !important;
}

we also can care for updating https://github.com/gijsdev/ublock-hide-yt-shorts/blob/master/list.txt along the way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants