Keybind HIT Return for Turkernator

Return any HIT with a press of a key.

当前为 2019-10-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Keybind HIT Return for Turkernator
  3. // @namespace https://github.com/Kadauchi
  4. // @version 1.0.0
  5. // @description Return any HIT with a press of a key.
  6. // @author Kadauchi
  7. // @include *
  8. // ==/UserScript==
  9.  
  10. // Visit https://keycode.info/ and use the event.code to change this value.
  11. const eventCode = 'NumpadSubtract'; // 'NumpadSubtract' is the default.
  12.  
  13. document.addEventListener('keydown', (event) => {
  14. if (event.code === eventCode) {
  15. TKNR.hitReturn();
  16. }
  17. });