您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Regular Split = E Macro Feed = Q
- // ==UserScript==
- // @name BNK's Macro
- // @namespace Add Any Site By Typing // @match and your website (above user script
- // @version 1.5
- // @description Regular Split = E Macro Feed = Q
- // @author FaLgOy
- // @match https://agar.io/*
- // @match https://germs.io/*
- // @grant none
- // ==/UserScript==
- / jshint -W097 /
- 'use strict';
- var SplitInterval;
- var MacroInterval;
- var SplitDebounce = false;
- var MacroDebounce = false;
- $(document).on('keydown', function(input) {
- console.log("got keydown")
- if (input.keyCode == 69) {
- if (SplitDebounce) {
- return;
- }
- SplitDebounce = true;
- SplitInterval = setInterval(function() {
- $("body").trigger($.Event("keydown", {
- keyCode: 32
- }));
- $("body").trigger($.Event("keyup", {
- keyCode: 32
- }));
- }, 0);
- } else if (input.keyCode == 81) {
- if (MacroDebounce) {
- return;
- }
- MacroDebounce = true;
- MacroInterval = setInterval(function() {
- $("body").trigger($.Event("keydown", {
- keyCode: 87
- }));
- $("body").trigger($.Event("keyup", {
- keyCode: 87
- }));
- }, 0);
- }
- })
- $(document).on('keyup', function(input) {
- if (input.keyCode == 69) {
- SplitDebounce = false;
- clearInterval(SplitInterval);
- return;
- } else if (input.keyCode == 81) {
- MacroDebounce = false;
- clearInterval(MacroInterval);
- return;
- }
- })