matches-css rules

Adam

Filters Developer
Staff member
Moderator
How to make a matches-css rule which contains:
Code:
background-image: url('...')
For example on this website - http://facet.wp.pl/technologie
In uBlock Origin I made this rule:
Code:
facet.wp.pl##div[class^="_"]:matches-css(background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD///////+qqqq/v7/MzMzV1dXb29u/v7/GxsbMzMzR0dHV1dXExMTIyMjMzMzPz8/S0tLGxsbMzMzR0dHIyMjKysrMzMzOzs7IyMjKysrMzMzOzs7Pz8/Ly8vMzMzPz8/JycnLy8vMzMzNzc3Ozs7KysrLy8vNzc3Ozs7KysrLy8vMzMzNzc3Ozs7KysrLy8vMzMzNzc3Ozs7KysrLy8vMzMzNzc3KysrLy8vMzMzNzc3Ozs7Ly8vLy8vMzMzNzc3Ly8vNzc3Nzc3Ly8vLy8vNzc3Nzc3Ly8vLy8vMzMzNzc3Nzc3Ly8vLy8vMzMzNzc3Nzc3Ly8vLy8vNzc3Nzc3Ly8vLy8vNzc3Nzc3Ly8vMzMzMzMzMzMzNzc3MzMzMzMzNzc3Ly8vMzMzMzMzMzMzMzMzMzMzNzc3Ly8vMzMzNzc3Ly8vMzMzMzMzMzMzMzMzMzMzMzMzNzc3Ly8vMzMzMzMzMzMzNzc3Ly8vMzMzMzMzNzc3Ly8vMzMzMzMzMzMzNzc3Ly8vMzMzMzMzMzMzNzc3Ly8vMzMzMzMzLy8vMzMzMzMzMzMzNzc3Ly8vMzMzMzMzMzMzNzc3Ly8vMzMzMzMzNzc3MzMzMzMzMzMzNzc3Ly8vMzMzMzMzNzc3MzMzMzMzMzMzNzc3Ly8vMzMzMzMzNzc3Ly8vMzMzMzMzMzMzNzc3Ly8vMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM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TPYbbf3HPqtM4WIuuSQQCFQXRumsVyVsvhFiqm6lPgNr8q7bgNyA/e/iQAJw+3selFQUrjhUA71FPp8vjd6FENjtQXxYjwx9CJTIFlSXzADqh/IAe+Kufg11gglLmyczEn6z/kyChp19l8G8DhMmnqjZHg5X/egK87qTGQlnDsS1PqFh054VUFtuwqffmn06HpCv6lv6rtWiJxgMJtF7dKCU0fClHaxt1vBg/nfE/5Vuwq4cDj8KSJHvjsatrp9438mskTD6RHVhmVxHyQ+e7lmP107XcN4/Sws/OeCcyD3mCll35MpwuOhPvfSf/JS0U17Tmj1Dw20H9aN/rwmduGnM5Xh2f+l1wr3PAgW9Xg2n9Xeg4dRTNwANL0JQlyu6Z7GvXb1P83yI+7SYdmNuSyrgbZqzbC/4V5IUTCpoQBV8zP9FOJzfMoGB/QAAAABJRU5ErkJggg=="))
and it works.
upload_2016-11-30_0-20-48.png

How to make the same in Adguard?
 
Last edited:

Alex302

Filters Developer
Staff member
Administrator
Try to escape commas and slash.
Or
Code:
:matches-css-before(background-image: url(data:iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD))
 

Adam

Filters Developer
Staff member
Moderator
@seanl thank you for your answer, yes I see this error.

@Alex302 thank you for your answer, your rule does not work for me, but these rules work:
Code:
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(data:))
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(*iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD*))
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(*base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD*))
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(data*image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD*))
These does not:
Code:
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(data:i))
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(data:i*))
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(data:image\/png;base64\,iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD))
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD))
facet.wp.pl##div[class^="_"]:matches-css(background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAtCAMAAADMQ1gEAAACiFBMVEUAAAD*))
I may be wrong, but I think the problem is in ":" after "data".
 
Top