Quick Split

Press 2, 3, 4 key to split twice, thrice and quad times respectively all really fast

目前為 2021-09-22 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Quick Split
// @version      5
// @description  Press 2, 3, 4 key to split twice, thrice and quad times respectively all really fast
// @namespace    http://tampermonkey.net/
// @author       P_M_9_8_6
// @match       *http://paper-io.com/agar/*
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @compatible   chrome
// @compatible   firefox
// @grant        none
// ==/UserScript==


$("document").ready(console.log("Script is ready"));

/* Key : Codes 
    1  :  50
    2  :  51
    3  :  52
*/
$("body").keydown(function(key){
    if(key.keyCode == 50){ // Double Split 
        doubleSplit();
    }
    if(key.keyCode == 51){ // Triple Split
        tripleSplit();
    }
    if(key.keyCode == 52){ // Quad Split
        quadSplit();
    }
            return;
        });
var global_i = 0;
function doubleSplit() {
        if (global_i < 2) {
                global_i++;
                sp(17);
                console.log("Double Split");
                setTimeout(doubleSplit, 170); // Increase this number to make its double split slower dont decrease it the server might not accept the split below this number
        }
        else
            global_i = 0;
}

function tripleSplit() {
        if (global_i < 3) {
                global_i++;
                sp(17);
                console.log("Triple Split");
                setTimeout(tripleSplit, 170);// Increase this number to make its triple split slower dont decrease it the server might not accept the split below this number
        }
        else
            global_i = 0;
}
function quadSplit() {
        if (global_i < 4) {
                global_i++;
                sp(17);
                console.log("Quad Split");
                setTimeout(quadSplit, 170);// Increase this number to make its quad split slower dont decrease it the server might not accept the split below this number
        }
        else
            global_i = 0;
}