Agar.io Mouse Controls

Left-click = Split, Right-click = Feed.

17.05.2017 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Agar.io Mouse Controls
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Left-click = Split, Right-click = Feed.
// @author       Tom Burris
// @icon         http://bit.ly/2oT4wRk
// @match        http://agar.io/*
// @grant        none
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    var speed = 50;
    var ejectDown = false;
    var canvas = document.getElementById("canvas");
    canvas.addEventListener("mousedown", function(event) {
        switch(event.which) {
            case 1:
                window.core.split();
                break;
            case 2:
                for(var n = 0; n < 4; n++) {
                    setTimeout(window.core.split, n * speed);
                }
                break;
            case 3:
                ejectDown = true;
                eject();
                break;
        }
    });
    window.addEventListener("mouseup", function(event) {
        if (event.which == 3) {
            ejectDown = false;
        }
    });
    canvas.addEventListener("mousewheel", function(event) {
        canvas.dispatchEvent(new MouseEvent('mousemove', {'clientX': window.innerWidth/2, 'clientY': window.innerHeight/2}));
    });
    canvas.addEventListener("contextmenu", prevent);
    canvas.addEventListener("drag", prevent);
    function eject() {
        if (ejectDown) {
            window.core.eject();
            setTimeout(eject, speed);
        }
    }
    function prevent(event) {
        event.preventDefault();
    }
})();