// ==UserScript== // @name Agma.io - Respawn on R // @namespace http://gronlokke.github.io/ // @version 0.1.1 // @description Click R to respawn in Agma.io. // @author Gronlokke // @match http://agma.io/* // @downloadURL none // ==/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 && document.activeElement == document.body) { // You can replace this number with another key, just check the key code on keycode.info. rspwn(document.getElementById('nick').value); play.click(); } } } /* jshint ignore:end */