Gats.io right click for spacebar (07/2025)

Now working ability to press the right click in order to use the spacebar. Now also works for shield!

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Gats.io right click for spacebar (07/2025)
// @version      2.5
// @description  Now working ability to press the right click in order to use the spacebar. Now also works for shield!
// @author       Rayan223
// @match        https://gats.io
// @icon         none
// @grant        none
// @license MIT
// @namespace https://greasyfork.org/users/825882
// ==/UserScript==

function playing() {
    var menu = document.getElementById('slct');
    if (menu.className == "container"){
        return false
    }else{
        return true
    }
};

document.addEventListener('mousedown', e => {
    if(playing() && event.which == 3){
        Connection.list[0].socket.send('k,5,1');
    }
});

document.addEventListener('mouseup', e => {
    if(playing() && event.which == 3){
        Connection.list[0].socket.send('k,5,0');
    }
});