Agma.io - Respawn on R

Click R to respawn in Agma.io.

נכון ליום 12-10-2017. ראה הגרסה האחרונה.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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         Agma.io - Respawn on R
// @namespace    http://gronlokke.github.io/
// @version      0.1.0
// @description  Click R to respawn in Agma.io.
// @author       Gronlokke
// @match        http://agma.io/*
// ==/UserScript==
/* jshint ignore:start */
window.onload = function() {
    var respawn = document.getElementsByClassName("rspwnBtn")[0];
    var play = document.getElementById("playBtn");
    window.onkeydown = function(e) {
        if (e.keyCode == 82) { // You can replace this with another button, just check the key code on keycode.info.
            respawn.click();
            play.click();
        }
    }
}
/* jshint ignore:end */