I am trying to make a uBlock Origin filter which blocks a video if there is a notice saying it was created with generative AI. While I'm able to make filters to select both items individually, I can't figure out how to make one filter dependent on the other one.

Example HTML:

<div class="html5-video-container"></div> <!-- other HTML elements--> <span class="ai-content-notice"></span>

Filter for video:

www.example.com##.html-5-video-container

Filter for AI Generated content notice:

www.example.com##.ai-content-notice

I'm aware of the procedural filter :has(), but that would only work if the AI notice was a child element of the video container.

How do I create a uBlock filter that only blocks the video element if the AI content element also exists?

Stevoisiak's user avatar

1

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.