im using chrome and ublock, i want to hide videos based on their titles on youtube video sidebard, i'm using the following data but it has a problem that it shows everything for a second before it got hidden:##yt-lockup-view-model.lockup:has-text(/a/i)
Assistant
You're trying to hide YouTube sidebar video elements based on their titles with uBlock Origin using a CSS selector, but the problem is the content shows briefly (flash of unfiltered content) before it gets hidden. This is because uBlock's cosmetic filtering is applied after the page has rendered, which can cause flickering.
What's happening
Your selector:
code
##yt-lockup-view-model.lockup:has-text(/a/i)
Targets elements with classes yt-lockup-view-model and lockup that have text matching /a/i.
But cosmetic filters (CSS-based) hide the element only after it is rendered, so the user sees it briefly.
Solutions:
1. Use an element picker with the most specific and early applied filter possible
Try to target elements that are present as early as possible and use specific selectors.
YouTube's markup changes frequently and the class names you're using look outdated (like yt-lockup-view-model.lockup), so this may hit only after some JS renders the recommendation sidebar.
Check the current YouTube markup; as of recent versions, elements in the sidebar are usually <ytd-compact-video-renderer> or similar.