nth-of-type(1), nth-of-type(2), etc are common in elements in the page, and thus show up a lot in filters made by element picker, and slow to deal with, some sort of quick key/shortcut/button would be nice. #3509
-
A lot of elements that take up/waste space such as where ads would go or other unnecessary popups seem to have nth-of-type(1) these days, this is annoying because either I have to remove each item individually until they stop appearing (And there can be potentially infinite of them) or go into my filter lists, find the filter, modify it so it catches it universally, then go back to the page, then reload the page, and make sure no new ones show up. Normally when I get rid of these annoyances that don't do that so the default filter is already universal, I can just left click and block, so having to do all that every single time I find a new website and they have something that's in the way it gets really tedious. I'm not sure why but modifying the filter in the preview menu doesn't seem to work so I have to go to ublock's settings page? Not sure if that's supposed to be the case. Either way, I'd really like some sort of method, that at a press of the button while modifying the filter in element picker mode, it would switch from being only for one element, but for all. www.bloomberg.com##div.rightRail_stickySegment__fqwBi:nth-of-type(1) www.abc15.com##div.sal--wrapper:nth-of-type(4) www.iflscience.com##div.sidebar-item:nth-of-type(2) www.huffpost.com##div.advertisement-holder.cli-advertisement.cli:nth-of-type(26) www.dagens.com##a.facebook.social-link:nth-of-type(2) www.canva.com##div.NqU4Yg.TSBL8g:nth-of-type(2) and a bunch others. Now there's a few ones that do something a bit different, like Which Idk how to deal with. but around 95% of html elements that don't just get rid of all at once use the nth-of-type . |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Select better one from the list or use sliders? |
Beta Was this translation helpful? Give feedback.
-
If you use so many of |
Beta Was this translation helpful? Give feedback.
-
Just to be clear, I'm using this in a case that isn't professional. I'm talking about custom filters that I use for myself put for websites to get rid of large unnecessary wasted space, such as ad containers/ads and popups. nth-of-type shows up pretty much in every website, from YouTube to random obscure news sites. https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type I mean its built in, its easy to use, of course its common. I think I was not clear about that above, so I'll edit it to make that more obvious. |
Beta Was this translation helpful? Give feedback.
Are you trying to select a better suggestion from the list? (as seen here)
Ultimately, there is most likely always a better filter to be hand-crafted than using
nth-of-type
, this requires using your browser inspector to find out, for instance:has
filters might be better suited for your cases. The best way to learn is to provide the URL of a webpage and tell us what exactly you want to filter out on the page. You will receive answers and over time you can learn from these to craft yourself better filters.