Agar Delta fix

Fix for Agar.io Delta extension: Google sign-in O auth. 400 request malformed

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Agar Delta fix
// @namespace    https://greasyfork.org/scripts/567383
// @version      2026-2-24
// @description  Fix for Agar.io Delta extension: Google sign-in O auth. 400 request malformed
// @author       Gemini, XComhghall
// @match        https://agar.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const windowOpenOld = window.open;

    window.open = function(url, name, specs) {
        if (typeof url === 'string' && url.includes('accounts.google.com/o/oauth2/auth/oauthchooseaccount')) {
            const urlNew = url.replace('/o/oauth2/auth/oauthchooseaccount', '/o/oauth2/auth') + `&nonce=${Date.now()}&prompt=select_account`; // .replace('gsiwebsdk=2', '');

            console.log('[Delta fix] Google O auth.', urlNew);

            return windowOpenOld(urlNew, name, specs);
        }
        return windowOpenOld(url, name, specs);
    };

    // console.log('[Delta fix] Active');
})();