gijsdev / ublock-hide-yt-shorts

uBlock Origin filter list to hide YouTube Shorts
MIT License
1.15k stars 63 forks source link

Hides shorts on history #27

Open xugro opened 3 months ago

xugro commented 3 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 3 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!