"hide div element with class" not working idk why.

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
Undorik
Posts: 1
Joined: Wed Apr 19, 2017 1:00 pm

"hide div element with class" not working idk why.

Post by Undorik »

Hi all,

I need a small assistance with filters, guide is not working in my case idk why. Latest firefox with latest adblock.

On one interesting website randomly popup is appears. It is not 3rd party ads, it is subscription "window".

The problem is guide en/filters tells:
For example the following rule will hide anything following a div element with class "adheader": ##div.adheader + *.
I need to block that div id="inboxer" class="delivery*"
delivery every time has different number at the end
Image

##div.inboxer* + * and
##div.delivery* + * are not helping :(

Any ideas? I can see some restrictions for this filters and not sure thaе they are appropriate.

Thanks in advance.
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: "hide div element with class" not working idk why.

Post by lewisje »

The # and . selectors only work with literal ID and class names, not wildcards; for wildcards, use attribute selectors: https://developer.mozilla.org/en-US/doc ... _selectors
  • To block a div with ID inboxer, just use ##div#inboxer
  • To block a div with class starting with "delivery", use ##div[class^="delivery"]
  • To block a div with ID starting with "inboxer" and class starting with "delivery", use ##div[id^="inboxer"][class^="delivery"]
I believe you can come up with similar ideas as needed.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Post Reply