I want to add uBlock filters against certain elements, but the site won't allow me.


Senzune's avatar
Okay, so there's this website - let's say it's deviantART, purely hypothetical of course - and I want to block certain elements - say, everything to do with CORE.

Now, this website doesn't play nice. When I click on my username, there's a CORE cancer button in the drop down menu. However, when I right click + select block element, the drop down menu disappears.

Additionally, I don't really understand how to manually create filters either.

So, is anyone willing to help me with this situation? It would be much appreciated! Because really, this website needs to have things blocked permanently - and of course it's not deviantART and the cancer that is CORE, that was purely hypothetical, wink wink! ^^
Comments4
Join the community to add your comment. Already a deviant? Log In
shininginthedarkness's avatar
If you're willing to go another route, Pakaku just wrote a Stylish script for this. Well, it doesn't block it, but it keeps it from being orange.
Ionosphere-Negate's avatar
Use uMatrix. It's by the same guy, but you can block very specific elements. Unfortunately all domains besides the one you're on are auto-blocked, so you have to do shit like enable YouTube for every website you go on, ever.
Turaiel's avatar
As a web developer I understand how expensive and difficult it is to provide web sites as a free service and still somehow stay afloat. Advertisements make that easier but they can only bring in so much, especially when the majority of your user base is blocking them. With that said, I do not support removal of Core, but I will explain some of the basic concepts you'll need to do this right.

Ad blockers block certain types of elements by hiding them using some sort of unique identifier. This can be an "id" attribute, a "class" attribute, or if neither is present, possibly using the whole DOM tree (HTML) up to that point to try and make the element unique. If you don't understand these concepts of web sites, you're going to have a hard time figuring out how to create efficient and correct filters.

If you really want to block Core, a major function of keeping DeviantArt freely available, then you're going to need to use your web inspector (right click > inspect element) to find the absolute correct element (usually what you clicked or a child of it) and determine its ID or class. Keep in mind that classes can be shared by other objects so IDs are preferable if available.

If you actually want to understand what's going on and do things efficiently, I would suggest learning how HTML and CSS work, because only then will you be able to block every instance of an element without breaking anything else (and it's a painstaking process). If you do know CSS, you can use an extension called Stylish which will allow you to set custom page styles for a URL of your choosing, which would also let you remove Core features.