Macro Feed

Macro Feed!

当前为 2016-05-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Macro Feed
  3. // @namespace http://tampermonkey.net/
  4. // @version 1738
  5. // @description Macro Feed!
  6. // @author Agar_Swag
  7. // @match http://agar.io/*
  8. // @grant none
  9. // ==/UserScript==
  10. var interval;
  11. var switchy = false;
  12. $(document).on('keydown',function(e){
  13. if(e.keyCode == 81){
  14. if(switchy){
  15. return;
  16. }
  17. switchy = true;
  18. interval = setInterval(function() {
  19. console.log('firing')
  20. $("body").trigger($.Event("keydown", { keyCode: 87})); $("body").trigger($.Event("keyup", { keyCode: 87}));
  21. }, 10);//increase this number to make it fire them out slower
  22. }
  23. })
  24.  
  25. $(document).on('keyup',function(e){
  26. if(e.keyCode == 81){
  27. switchy = false;
  28. clearInterval(interval);
  29. return;
  30. }
  31. })