Page 1 of 1
xpath adblock
Posted: Tue Feb 11, 2014 10:27 pm
by movie 180
Re: xpath adblock
Posted: Wed Feb 12, 2014 8:03 am
by Gingerbread Man
I split off this post into its own thread, because it's an interesting request if feasible, and it didn't have much to do with
its parent thread.
Re: xpath adblock
Posted: Fri May 02, 2014 4:13 pm
by greiner
We're using CSS selectors because we're directly applying them to the page without any modifications and let the browser do all the hard work for us. However, we can't do that with XPath without negatively impacting element hiding performance.
Re: xpath adblock
Posted: Sat May 03, 2014 9:32 am
by Gingerbread Man
greiner wrote:However, we can't do that with XPath without negatively impacting element hiding performance.
In the same way that regexp filters are slower than regular filters but
- Sometimes there's no other way to block the item.
- One or two slow filters won't have any noticeable impact on performance.
Re: xpath adblock
Posted: Tue Jul 05, 2016 6:56 pm
by lewisje
It looks like uBlock Origin has implemented both the
:has() relational pseudo-class (formerly known as the parent-selector, new syntax inspired by jQuery) and XPath-based hiding rules:
https://github.com/gorhill/uBlock/issue ... -230120248
It looks like this is the most relevant part of the code:
https://github.com/gorhill/uBlock/blob/ ... ng.js#L748
Ideally, if
:has() is ever widely implemented (right now
no browsers implement it), the extension will be able to use this implementation as only a fallback.
Re: xpath adblock
Posted: Sun Aug 21, 2016 5:30 am
by mikhoul
I needed to do a filter with has() and asked to myself if ABP was having something like that...
I ask to myself if I keep ABP and use UserScripts for more complicated filters or if I switch to uBlock origin.
The only thing I would really miss is the convenience of the list of blockable items.
Debating with myself what I should do
Re: xpath adblock
Posted: Sun Aug 21, 2016 6:53 am
by lewisje
uBlock Origin has a logger that is quite useful, but anyway, both :has() and xpath are being considered for ABP too:
https://issues.adblockplus.org/ticket/2360
Re: xpath adblock
Posted: Sun Aug 21, 2016 8:11 am
by mapx