mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Update xml-prune
parent
5649af88b3
commit
98fbc25148
1 changed files with 4 additions and 7 deletions
|
|
@ -403,21 +403,18 @@ If the site uses `eval` in lieu of `JSON.parse`, see: [evaldata-prune](#evaldata
|
|||
***
|
||||
|
||||
### xml-prune.js [↪](https://github.com/gorhill/uBlock/blob/bf690145c493acd86e578d7a860da238f0af72d4/assets/resources/scriptlets.js#L1672)
|
||||
Removes an element from the specified XML.
|
||||
|
||||
New in [1.44.5b3](https://github.com/gorhill/uBlock/commit/bf690145c493acd86e578d7a860da238f0af72d4)
|
||||
|
||||
Parameters:
|
||||
- required, the selector of elements which are to be removed.
|
||||
Example: `Period[id*="-roll-"][id*="-ad-"]`
|
||||
- optional, a selector that must have a match in the document
|
||||
for the pruning to occur. No selector means the pruning can
|
||||
be performed regardless.
|
||||
- optional, a URL which must be a match for the pruning to
|
||||
occur. If left blank, the pruning can be performed regardless.
|
||||
- optional, a selector or xpath <sup>(New in [1.49.3rc15](https://github.com/gorhill/uBlock/commit/8ed78cfb234d3b9c615ee1deebea0ff0439ea7f3)</sup> that must have a match in the document for the pruning to occur. No selector means the pruning can be performed regardless.
|
||||
- optional, a URL which must be a match for the pruning to occur. If left blank, the pruning can be performed regardless.
|
||||
|
||||
Examples:
|
||||
- `cbs.com##+js(xml-prune, Period[id*="-roll-"][id*="-ad-"], , pubads.g.doubleclick.net/ondemand)`
|
||||
|
||||
- `play.max.com##+js(xml-prune, xpath(//*[name()="Period"][not(.//*[name()="SegmentTimeline"])]), , .mpd)`
|
||||
|
||||
***
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue