[in beta-testing] Gats.io right click for spacebar

This script is under developpement. an old version of it works but not for shield here: https://gf.qytechs.cn/fr/scripts/433998-in-beta-testing-gats-io-right-click-for-spacebar?version=987557. I'm currently having issues with the mouse event, google chome has changed it to pointer and it is not easy to handle it but i'm trying my best.

目前為 2022-09-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name         [in beta-testing] Gats.io right click for spacebar
// @version      2.3.3
// @description  This script is under developpement. an old version of it works but not for shield here: https://gf.qytechs.cn/fr/scripts/433998-in-beta-testing-gats-io-right-click-for-spacebar?version=987557. I'm currently having issues with the mouse event, google chome has changed it to pointer and it is not easy to handle it but i'm trying my best. 
// @author       Rayan223
// @match        https://gats.io
// @icon         none
// @grant        none
// @license MIT
// @namespace https://gf.qytechs.cn/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');
    }
});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址