This is AdBlock's old support site. It is available for archival purposes only. To create a new discussion, or to visit the up-to-date knowledge base, please visit help.getadblock.com

vk.com, block hierarchical div by its nested content

Sergey's Avatar

Sergey

05 Mar, 2015 04:09 PM

Hello!

Will try to explain what I need to block on pseudo-language:

For url vk.com/feed:
block

DIV[class="feed_row"]
which contains
DIV (with no constant attributes)
which contains
DIV[class="post_table"]
which contains
DIV[class="post_info"]
which contains
DIV[class="wall_text"]
which contains
DIV (with no constant attributes)
which contains
DIV[class="wall_post_text"]
which contains
a href [mention_id="vamplegend"] and [onclick="return mentionClick(this, event)"]

This construction will completely remove annoying application posts from vk.com/feed. Unfortunately, there is no way to filter posts from applications at this site, I can only block all posts from the user.

Is there a way to write such complex filter?

  1. Support Staff 1 Posted by Neelfyn on 11 Mar, 2015 07:33 PM

    Neelfyn's Avatar

    Hi Sergey,

    If I'm understanding correctly, you'd like to block the parent DIV based on its contents — this is unfortunately not currently possible. It may become possible in the future with the CSS4 parent selector.

    In the meantime, you can still hide the anchor or the whole DIV with the relevant rules below:

    vk.com##a[mention_id="vamplegend"]
    vk.com##DIV.feed_row
    

    Hope this helps!

Discussions are closed to public comments.
If you need help with AdBlock please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac