hide-if-matches-xpath
The hide-if-matches-xpath snippet hides specific elements through an XPath 1.0 query string.
Parameters
|
Name |
Description |
Mandatory |
|---|---|---|
|
query |
The XPath query that targets the element to hide. |
Yes |
|
scopeQuery |
XPath query defining the scope of the Mutation Observer. Be as specific as possible. |
No |
|
waitUntil |
Delay until given state (loading, interactive, complete, load, or event name). |
No |
Filter examples
|
Filter |
Result |
|---|---|
|
|
Hides all elements. |
|
|
Hides the element with |
|
|
Hides all elements with class |
|
|
Waits until document is complete before hiding. |
Always use double-quotes instead of single-quotes inside selectors.