code-charity / youtube

[top~1 open YouTube & Video web-extension] Enrich your experience & choice! 🧰100+clever features📌set&forget📌Longest-standing(yet rare&tough alone. Please help/join🧩us👨‍👩‍👧‍👧) ..⋮ {playback|content discovery|player|extra buttons|distractions|related videos|shorts|ads|quality|codec|full tab|full screen}
http://improvedtube.com
Other
3.29k stars 498 forks source link

`chips-wrapper` doesn't care about the state of the header (renders even if it's hidden) #2358

Open alexlnkp opened 2 weeks ago

alexlnkp commented 2 weeks ago

Bug Report:

image

OS: Arch Linux x86_64
Kernel: Linux 6.8.9-arch1-2
WM: Hyprland (Wayland)

So, the chips-wrapper is an element that is used A LOT on the website, from this ugly thing below the search bar to the "sort videos by" thing on every YT channel: image

I tried using uBlock Origin to just hide the chips:

www.youtube.com###chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

Which kind of works, but it hides EVERY chips-wrapper on the website, including the "sort by" element on the YT channels' video pages, which is not ideal at all.

Let me know if I can provide more details on the matter.

ImprovedTube commented 2 weeks ago

Hi! and thanks @alexlnkp, @joaolscosta looked into this recently

Making your rule more specific: www.youtube.com##:matches-path(/^\/(feed\/|$)/) chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

Many of our features can also be uBlock Origin rules. and we should support them. And or fork uBlock / part of it. Or making them crowdsource rules: Please compare or join: https://github.com/code-charity/crowd-fixes
https://github.com/code-charity/crowd-fixes/issues/1 https://github.com/code-charity/youtube/issues/2223#issuecomment-2161363980

alexlnkp commented 2 weeks ago

Making your rule more specific: www.youtube.com:matches-path(/^\/(feed\/|$)/)##chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

This doesn't seem to work or I may have misunderstood. image

I tried adding this rule to both filters and rules in uBlock origin, but both of those appear to not work at all Attempting to add to filters gives error Invalid filter: Bad domain name, Attempting to add to rules doesn't give a specific error, but highlights every part of the rule with red.

I assume it is because of regex in the domain name? I've never been to knowledgeable in Web...

As for the resources You've sent - the crowd-fixes seems like a very nice idea, I'll look into it. Thanks!

ImprovedTube commented 1 week ago

now? @alexlnkp ( https://github.com/gorhill/ublock/wiki/Procedural-cosmetic-filters#subjectmatches-patharg ) seems few people in the world are too knowledgeable about uBlock rules syntax (besides it is like CSS, and "even if 1 in a million people is a regular authors of them, they could do such great work together ("crowd fixes"). ( ImprovedTube for example is just hard to keep up with when alone. )

alexlnkp commented 1 week ago

www.youtube.com##:matches-path(/^\/(feed\/|$)/) chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

now? @alexlnkp ( Wiki: Procedural cosmetic filters (subjectmatches patharg) (gorhill/ublock) )

Figured it out, thanks to You!

www.youtube.com##:matches-path(/^\/(\/|$)/)#scroll-container > .ytd-feed-filter-chip-bar-renderer.style-scope

works for me! (my main yt page isn't marked as feed for some reason, instead it's just www.youtube.com

seems few people in the world are too knowledgeable about uBlock rules syntax (besides it is like CSS, and "even if 1 in a million people is a regular authors of them, they could do such great work together ("crowd fixes"). ( ImprovedTube for example is just hard to keep up with when alone. )

I've personally got a LOT of ublock origin rules to share, not just for YT too! I'll look into how I can help others with those :)

Best, Alex

ImprovedTube commented 1 week ago

one of us might make this a toggle at appearance>header>hide homepage tabs ? in menu skeleton/appearance.js we write settings & path into the root element so maybe: html[it-hide-homepage-tabs][it-path='/'] #scroll-container > .ytd-feed-filter-chip-bar-renderer.style-scope {display: none} (in js&css/.../appearance.css)

I've personally got a LOT of ublock origin rules to share, not just for YT too! I'll look into how I can help others with those :)

yay! let's go

main yt page isn't marked as feed

true