Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to block elements with their absolute /html/body/table/td[3]tr[2] or relative //div[@id="blah"]/table/tr[2] xpath or to use it as additional condition to prevent false positives?

ABP supports css selectors with firstoftype() and nthoftype(number), but in that case you have to get xpath expression separately, then somehow convert it to CSS and then manually enter it in Element Hiding Helper. Is there a better way to do it?

share|improve this question

You might consider trying Ublock Origin. It has an awesome picker that you can use to create custom filters (cosmetic CSS and net filters). I've used adblock plus, and adblock edge in the past and am not going back, absolutely loving Ublock Origins, although getting to the preferences/options where the custom filter rules is, is not as easy as I'd like.

Click on ublock icon, click on text "ublock origin (version number)" which sits above the over sized toggle button to filter off/on for the current open tab. Takes a day or two to get used to. I find it less painful to create filters with this plugin.

What's really cool about the picker is that when you click on something, you can see parent css rules, so you can traverse the tree up or down to get what you want. It's this feature that makes life easier for this kind of thing. I've found this to work with mixed results depending on the website. The Tables and DIVs often change between webpages on dynamic websites, so this is worthless on sites like Facebook or Chase bank. (Yes, I did a test run trying to clean up those sites.)

I'm not a web developer so a better answer may well come up, but I thought I'd put this out there to start. Very interested in this kind of thing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.