Simple Fast-Split Script

This is a simple script that allows you to fast-split. Just press X and it will fast split your cell one time!

目前为 2021-06-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Simple Fast-Split Script
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description This is a simple script that allows you to fast-split. Just press X and it will fast split your cell one time!
  6. // @author Chainx
  7. // @match https://agma.io/*
  8. // @icon https://i.imgur.com/ZSiYeJj.png
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. /*
  13. -==o HOW TO CHANGE THE FAST-SPLIT KEYBIND o==-
  14.  
  15. > Visit the link below. There you will find a list of every key available coupled
  16. with its own key code. Find the key you want to use as your fast-split keybind
  17. and simply replace the number in line 17.
  18. (You also need to Save the userscript and refresh Agma for the changes to apply.)
  19.  
  20. http://gcctech.org/csc/javascript/javascript_keycodes.htm
  21. */
  22.  
  23. (function() {
  24. 'use strict';
  25.  
  26. var $ = window.$;
  27. var fastSplitKey = 88
  28.  
  29.  
  30. //Setting up the one split function
  31. function oneSplit() {
  32. $("#canvas").trigger($.Event("keydown", { keyCode: 32}));
  33. $("#canvas").trigger($.Event("keyup", { keyCode: 32}));
  34. }
  35. //Setting up the freeze function
  36. function freeze() {
  37. $("#canvas").trigger($.Event("keydown", { keyCode: 70}));
  38. $("#canvas").trigger($.Event("keyup", { keyCode: 70}));
  39. }
  40. window.addEventListener('keydown', keydown);
  41. function keydown(event) {
  42. //If the X key is pressed then split once, freeze, and unfreeze after 60 milliseconds
  43. if (event.keyCode == fastSplitKey) {
  44. oneSplit()
  45. setTimeout(freeze, 0)
  46. setTimeout(freeze, 60)
  47. }
  48. }
  49. })();

QingJ © 2025

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