How to block the annoying “Before you continue” popup on Google?

Before it was possible to use Google with cookies disabled, or with extension Cookie-AutoDelete or something similar.

For some weeks, this is gone. After each cookie deletion, I receive a popup that I have to "Accept".

Before you continue

Google uses cookies and other data to deliver, maintain, and improve our services and ads. If you agree, we’ll personalize the content and ads you see based on your activity on Google services like Search, Maps, and YouTube. We also have partners that measure how our services are used. Click “See more” to review your options or visit anytime.

[I agree]

This means that we are basically forced to accept the all-mighty google cookie.

This is similar to the "Sign-in to youtube" popup problem

How to avoid the "Before you continue" popup while keeping short-lived throwable Google cookies?

Note: Google Consent Dialog Remover exists but does not work anymore.

4 Answers

Add the following JavaScript to your browser through an extension (like Tampermonkey for Chrome, or Firefox):

// ==UserScript==
// @name avoid Google's "before you continue"
// @namespace
// @version 0.2
// @description How to block the annoying “Before you continue” popup on Google?
// @author jonas
// @url
// @match
// @grant none
// @run-at document-start
// ==/UserScript==
// This will remove the popup but there are some problems:
// Buttons and menus like 'More', 'Tools', and many others will not work
const style = document.createElement('style');
style.innerHTML = /* css */ ` div[aria-modal] { display: none !important; }
`;
document.head.append(style);
// This solves the previous problems but it's probably not that great for privacy
const consentMatch = document.cookie.match(/CONSENT=(PENDING|YES)\+(\d+)/);
document.cookie=`CONSENT=YES+${consentMatch ? consentMatch[2] : '0'}; domain=.google.com`;

In Tampermonkey, on script Settings page, set Run at to document-start.

3

Just block all of the cookies for the page where you see this popup and voilà.

Open the View site information pane

Block all of the cookies that you see there

3

In addition to the answer of Stepan, you can also add both domains (google.com and ) into the Google Group Policy settings. You find this setting under: Google-Google Chrome-Content Settings-Block cookies on these sites. This way you can push this company-wide. Also, when your users are using google.<countrycode>, also add these. That helps the local google site users.

It seems that the userscript posted here has stopped working so here's a simpler version that does the trick for me :)

Direct link to install with tampermonkey:

If you have suggestions or questions:

// ==UserScript==
// @name Google Cookie Consent Remover
// @namespace
// @version 0.1
// @description Remove Google's annoying cookie consent questions (especially annoying for Incognito windows)
// @author Wolph
// @match
// @grant none
// ==/UserScript==
document.querySelector('div[aria-modal]').remove();

You Might Also Like