您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!!
当前为
// ==UserScript== // @name Fast Linesplit (like fast split) // @namespace Put your cursor on top of on of the dots and press U // @version 0.1 // @description try to take over the world!! // @author Net#1872 // @license GPL-3.0-or-later // @match https://cellcraft.io/ // @match https://agma.io/ // @grant none // ==/UserScript== var split = "U" window.addEventListener('keydown', keydown); setTimeout(function() { split = split.charCodeAt(0) }, 50) function tripleSplit(){ $("#canvas").trigger($.Event("keydown", { keyCode: 84})); $("#canvas").trigger($.Event("keyup", { keyCode: 84})); } function freezeKey() { $("#canvas").trigger($.Event("keydown", { keyCode: 70})); $("#canvas").trigger($.Event("keyup", { keyCode: 70})); } function keydown(event) { if(event.keyCode == split){ tripleSplit() setTimeout(freezeKey, 115) setTimeout(freezeKey, 165) } } $("head").append(`<style> .point { background-color:#333; } .point:hover { background-color: orange; } </style>`); //Credit to wynell for the window.innerHeight and window.innerWidth let [w, h] = [, window.innerHeight] $('body').append(` <div class="point" id="point-top" onclick="tripleSplit()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${ window.innerWidth / 2 }px; top: ${0}px; transform: translate(-50%, -50%);"></div> <div class="point" id="point-right" onclick="tripleSplit()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${ window.innerWidth }px; top: ${window.innerHeight / 2}px; transform: translate(-50%, -50%);"></div> <div class="point" id="point-bottom" onclick="tripleSplit()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${ window.innerWidth / 2 }px; top: ${window.innerHeight}px; transform: translate(-50%, -50%);"></div> <div class="point" id="point-left" onclick="tripleSplit()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${0}px; top: ${ window.innerHeight / 2 }px; transform: translate(-50%, -50%);"></div> </div>`) $('#settingTab3,.rab-radius').click(function (e) { $('#roleSettings').css('display', 'block') $('#cLinesplitOverlay') .removeAttr('disabled') .parent() .parent() .css('display', 'block') }) $('.hotkey-col') .eq(1) .append( `Linesplit overlay <div id="keyLinesplitOverlay" class="hotkey-input-2"></div><br>` ) $('#roleSettings').append( `<div class="role-setting"><label><input id="cLinesplitOverlay" type="checkbox"}><span> Linesplit overlay</span></label><br></div>` ) $(window).resize(function (e) { let [w, h] = [window.innerWidth, window.innerHeight] $('#point-top') .css('left', `${window.innerWidth / 2}px`) .css('top', `${0}px`) $('#point-right') .css('left', `${window.innerWidth}px`) .css('top', `${window.innerHeight / 2}px`) $('#point-bottom') .css('left', `${window.innerWidth / 2}px`) .css('top', `${window.innerHeight}px`) $('#point-left') .css('left', `${0}px`) .css('top', `${window.innerHeight / 2}px`) })