Greasy Fork is available in English.

Agar Delta fix

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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');
})();