Write a ublock filter rule for a parent element based on content of a child element
05:59 30 Jul 2019

I want to write a ublock filter to hide a list element that has a certain class and content, while I don't want to hide other list items that don't have this content:

class = "mp-Listing-priority"
content is "Topad"

This is the html code of the item that I want to hide.

  • None of the examples below hide the list elements that I want to hide:

    ##li.mp-Listing--list-item[class="mp-Listing-priority"]
    ##li.mp-Listing--list-item["Topad"]
    
    html css filter css-selectors