3 ms·
Yeah, I always have to write userscripts to get access to getElementsBy(TagName,Id,etc) and then call .parentNode().parentNode()... to reach the ancestor I want
by byuu 7y ago
Yeah, I always have to write userscripts to get access to getElementsBy(TagName,Id,etc) and then call .parentNode().parentNode()... to reach the ancestor I want to remove.
Of course the downside of userscripts compared to uBlock rules is that they take time to run, so you end up seeing the ads briefly before they are erased, which is annoying. So then I run the scripts prior to page-load to insert CSS rules to hide all elements that might be ads, let the page load, filter it, and then override the older CSS rules. It's quite a hassle, really.
What I'm saying is, :parent selectors in CSS would be greatly appreciated.