Greasy Fork镜像 is available in English.

Gats.io right click for spacebar

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

当前为 2022-09-19 提交的版本,查看 最新版本

// ==UserScript==
// @name         Gats.io right click for spacebar
// @version      2.4
// @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://greasyforks.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){
        RF.list[0].socket.send('k,5,1');
    }
});

document.addEventListener('mouseup', e => {
    if(playing() && event.which == 3){
        RF.list[0].socket.send('k,5,0');
    }
});
长期地址
遇到问题?请前往 GitHub 提 Issues。