How to deal with Google's and YouTube's aggressive popups (before you continue, sign in)

When you visit Google's main website for the first time, or after clearing cookies, you get a "before you continue" popup. On YouTube, another Google property, you will get a "sign in to YouTube" popup instead.
You need to click on "I agree" on Google's site or "no thanks" on YouTube to get rid of these popups and start using the sites.
Problem is: if you clear cookies regularly, you will get these prompts again. It can be quite annoying to deal with these popups each time, e.g. to inform YouTube for the hundredth time that you don't want to sign-in to the site.
You have a handful of options at your disposal to deal with this. One of the easier ones is to use a different search engine and site, without losing access to Google search results or YouTube videos.
You could use Startpage Search, as it is powered by Google's results, and for YouTube, you could use an Invidious mirror site, a desktop program like SMPlayer, or an app like NewPipe.
If you prefer to use the original sites, you could block the popups that Google displays on its main site and on YouTube instead.
For that, you need to use a content blocker such as uBlock Origin; it should work with others as well as the syntax is used by many.
Tip: We reviewed PopUpOff recently, a browser extension for Chrome and other Chromium-based browsers, that deals with the overlay on Google and YouTube sites.
To block YouTube's "sign in to YouTube" popup
Add the following lines to the My filters tab of the uBlock Origin settings:
www.youtube.com###dialog
www.youtube.com##.opened
The first blocks the actual popup, the second a fullscreen overlay that YouTube displays once you block the popup.
YouTube won't display the popup anymore after you add these options. Note that you need to reload the pages, and that there is a downside to using these as all videos will pause a moment after they have started. You can hit the play button to start playback anew though and watch the videos like you normally do.
Note: if you notice issues with the first, some users reported that search stops working, you may want to try the following lines instead:
youtube.com##ytd-popup-container
youtube.com##ytd-consent-bump-lightbox.style-scopewww.youtube.com##.opened
To block Google's "Before you continue" popup
To block Google's before you continue popup on the main Google site add the following lines to uBlock Origin's My filter tab:
www.google.com###lb
www.google.com##:root:style(overflow-y: visible !important;)
This one breaks the "more" link on Google's search results page but search functionality itself is working fine.
Now you: Use a different method? Feel free to share it in the comments below.


For Version 116.0.5817.0 (Official Build) dev (64-bit), Chrome Refresh 2023 has an option to enable omnibox at the same time.
Screenshot above is not showing the round shape. This is eye candies.
I wonder how to return the gray stripe but on a new design?
And in general, it’s strange why they didn’t make the entire top panel be painted in the color of the open site, like on android.
@D.M: +1, the new light blue looks odd, and the tab group buttons (the color dots) became way too big