Project Endor (Jamelio) Keybinds

Make keybinds for the Project Endor (Jamelio) voice recording hits.

当前为 2016-04-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Project Endor (Jamelio) Keybinds
  3. // @namespace http://kadauchi.com/
  4. // @version 1.0.2
  5. // @description Make keybinds for the Project Endor (Jamelio) voice recording hits.
  6. // @author Kadauchi
  7. // @icon http://kadauchi.com/avatar.jpg
  8. // @include https://www.google.com/evaluation/endor/*
  9. // @grant GM_log
  10. // @require https://code.jquery.com/jquery-2.1.4.min.js
  11. // ==/UserScript==
  12.  
  13. window.focus();
  14.  
  15. $(document).keydown(function(e){
  16. switch(e.which){
  17. case 49: // 1 (Record)
  18. case 97: // Numpad1 (Record)
  19. $("div[id^=g]").eq(0).children().children().trigger("mousedown");
  20. break;
  21. case 50: // 2 (Play)
  22. case 98: // Numpad2 (Play)
  23. $("div[id^=g]").eq(1).children().children().trigger("mousedown");
  24. break;
  25. case 51: // 3 (Submit)
  26. case 99: // Numpad2 (Submit)
  27. $("input[type='submit']").click();
  28. break;
  29. default: return;
  30. }
  31. });