Skip to content

Instantly share code, notes, and snippets.

@CuteLifeBot
Created October 15, 2019 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CuteLifeBot/5991684c79c29ba9d89c3fb5655836e8 to your computer and use it in GitHub Desktop.
Save CuteLifeBot/5991684c79c29ba9d89c3fb5655836e8 to your computer and use it in GitHub Desktop.
(function() {
var olddown = window.onkeydown,
oldup = window.onkeyup;
var repeat = 0;
window.onkeydown = function(e) {
e.keyCode == 69 && (repeat = 1) || olddown(e)
};
window.onkeyup = function(e) {
e.keyCode == 69 && (repeat = 0, 1) || oldup(e)
};
var k = {
keyCode: 87
};
setInterval(function() {
if (!repeat) return;
olddown(k);
setTimeout(function() {
oldup(k);
}, 10);
}, 20);
setTimeout(function() {
core.setMinimap(1);
core.playersMinimap(1);
}, 250)
})();
// Minified
javascript: !function(){var n=window.onkeydown,o=window.onkeyup,e=0;window.onkeydown=function(o){69==o.keyCode&&(e=1)||n(o)},window.onkeyup=function(n){69==n.keyCode&&(e=0,1)||o(n)};var i={keyCode:87};setInterval(function(){e&&(n(i),setTimeout(function(){o(i)},10))},20),setTimeout(function(){core.setMinimap(1),core.playersMinimap(1)},250)}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment