Big Coins

shows coins bigger

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Big Coins
// @namespace    http://tampermonkey.net/
// @version      0.0.1
// @author       Big watermelon
// @license      MIT
// @description  shows coins bigger
// @match        *://agma.io/*
// @grant        unsafeWindow
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    if (unsafeWindow.top !== unsafeWindow.self || document.querySelector("title")?.textContent?.includes("Just a moment"))
        return;

    const SIZE = 300;

    let overwritten = false;
    const originalPush = unsafeWindow.Array.prototype.push;
    unsafeWindow.Array.prototype.push = function(elem) {
        if (!overwritten && elem?.namePart !== undefined) {
            Object.defineProperty(elem.constructor.prototype, 'size', {
                set: function(size) {
                    return this._size = size;
                },
                get: function() {
                    return this.a == 13 ? SIZE : this._size;
                }
            });
            overwritten = true;
        }
        return originalPush.apply(this, arguments);
    };
})();