hide-if-classifies
The hide-if-classifies
snippet hides any HTML element (or its ancestors) that match a CSS selector if the element is classified as an ad by a machine learning model.
You can use hide-if-classifies
to hide elements based on statistical predictions.
Parameters
Name | Description | Mandatory |
---|---|---|
| The name of the model to be used for inference. Must be hosted on | Yes |
| A CSS selector matching all DOM elements to run inference on. If inference results in a positive prediction for any of the matches, the matched element will be hidden. If | Yes |
| A CSS selector matching a DOM element within | No |
Filter examples
The following table lists examples that use the hide-if-classifies
snippet:
Filter | Result |
---|---|
| Hides any element matching |
| Hides any element matching |
Last updated