I'm not sure if it's a feature, but it's most likely a bug, I think. So, I was trying to block an element that included ads, but it was blocking other elements on the page as well. I started by right-clicking the element and clicking _Block element_. Then I tried to inspect the web page (which, BTW, is very poorly designed) and it seemed that there was nothing wrong with the filter that uBlock Origin has generated, but it was clearly blocking other portions of the page as well. After about 5 minutes of tinkering, suddenly, it hit me. The autogenerated filter's CSS selector doesn't start with body >, so it matches multiple elements in the DOM tree.
body > table > tbody > tr > td:nth-child(2)/html/body/table/tbody/tr/td[2]
##table > tbody > tr > td:nth-of-type(2)##body > table > tbody > tr > td:nth-of-type(2)Irrelevant.
Irrelevant.
add
||sab.turbo.ge^$script
||forum.ge/trash/*
||adjarabet.com^$domain=forum.ge
@mapx-
add
||sab.turbo.ge^$script ||forum.ge/trash/* ||adjarabet.com^$domain=forum.ge
Thanks, but I'm not asking for help; I'm just reporting a bug...
Besides, this configuration won't hide the elements, so the ad placeholders won't go away...
add also
||sab.turbo.ge^$subdocument
_sab.turbo.ge_ is an ad serving service, so I'm blocking the domain altogether. I'm also hiding the elements on the website using the following:
forum.ge###ipbwrapper > table:nth-of-type(1) > tbody > tr > td:nth-of-type(2)
forum.ge###ipbwrapper > .tableborder > table > tbody > tr > .row4:nth-of-type(2) > table > tbody > tr > .desc
forum.ge##body > table > tbody > tr > td:nth-of-type(2)
The point is, I'm not asking for help; I just thought that it's a good idea to start filters' CSS selectors with body > when it's not possible to use ID, so it won't match multiple elements by default.
I can reproduce.
uBO should automatically prepend body > when the suggested filter is still ambiguous after using all the components in the stack.