2

I am just getting started on uBlock, the privacy controls were easy enough, with a few buttons I am on top of it. My concern now is just getting websites to look the way I want them to.

I am constantly finding myself making new rules, hiding the same element, for every website I frequent.

For example, I always want to hide any "footer" element, so far I have created new rules for:

old.reddit.com##.footer-parent
www.bbc.co.uk##.orbit-domestic-yes.orb-footer
www.diyelectriccar.com##.p-footer
...

I would like to just do this sort of thing with one like this:

*##.footer-parent

I discovered the usage of *, while reading some comment on Reddit. Even then it does not seem to be "universal":

  • *##.footer-parent only works on Reddit.old
  • *##.p-footer only works only on DIYelectriccar

and so on. Is there some sort of regex syntax in CSS that I can use to select elements by depending on their name? Or maybe there is a better way.

I dont have any web dev experience at all. Hence why I am asking this.

I searched around, I came across Remove Footer from ALL websites but the solution does not work for me. I have not been able to find anything specifically on cosmetic filtering.

Destroy666
  • 12,350
Ralf_Reddings
  • 445
  • 2
  • 9

1 Answers1

1

You can't just block everything that fits your very generic description, such as "footer". The term "footer" is loosely related to design, much more than to programming or markup. And tools like uBlock want to know specific definitions related to websites' structure rather than what you, the user, sees.

HTML is not too strict. You can use many elements in different ways without following any standards. While there's HTML5's <footer> tag, which is easy to use and follow, hence it's quite common, many sites will use <div id="footer">, <div class="footer">, <section class="f6"> or <div class="nowastopka">. Especially older ones that were made before HTML5. Anything is possible.

<footer> etc. could also be used as a part of a section which is in the middle of the website. Because the author wanted to signify it's e.g. the bottom of e.g. an article or a comment section. This is also fully valid.

Other websites could have a <footer> element at the top just for fun or because of incompetence, even though it's completely wrong semantically. Noone can forbid that, the HTML page will be output. So if you tried to block all footer elements, you could block unexpected parts of random websites.

I'd recommend clicking on some of uBlock's in-built lists to see how complicated they get to block lots (but not all either) ads by clicking on the eye symbol:

Eye button

There are hundreds of thousands of records collected by users. To block most footers without blocking anything else, you'd need a similar number of selectors.

Destroy666
  • 12,350