gijsdev / ublock-hide-yt-shorts

uBlock Origin filter list to hide YouTube Shorts
MIT License
1.37k stars 82 forks source link

Hides shorts on history #27

Closed xugro closed 3 months ago

xugro commented 8 months ago

The current setup hides the shorts I watched on my history page. I still watch shorts on mobile and sometimes want to check the links in description from a computer but I need to disable ublock temporarily would appreciate if they weren't blocked on my history page.

PanDabStudios commented 8 months ago

Hello, you can do that by adding a :not([href*="/feed/history"]) after every line that is not a comment, and that should do the trick.

Example:


! Hide all videos containing the phrase "#shorts"
www.youtube.com##ytd-grid-video-renderer:has(#video-title:has-text(/(^| )#Shorts?( |$)/i))
www.youtube.com##ytd-rich-item-renderer:has(#video-title:has-text(/(^| )#Shorts?( |$)/i))

becomes

! Hide all videos containing the phrase "#shorts"
www.youtube.com##ytd-grid-video-renderer:has(#video-title:has-text(/(^| )#Shorts?( |$)/i)):not([href*="/feed/history"])
www.youtube.com##ytd-rich-item-renderer:has(#video-title:has-text(/(^| )#Shorts?( |$)/i)):not([href*="/feed/history"])

hope this helps!

gijsdev commented 3 months ago

Added a patch for this in https://github.com/gijsdev/ublock-hide-yt-shorts/commit/3f44bb1fb455bbff68ea9c8912eb4721c31aff63

It will be included in the next release.