msb key listener

key listener ESC

当前为 2024-08-25 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name msb key listener
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024年8月25日21点56分
  5. // @description key listener ESC
  6. // @license MIT
  7. // @author onionycs
  8. // @match https://www.mashibing.com/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=mashibing.com
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Your code here...
  17. document.addEventListener('keydown', function(event) {
  18.  
  19. if (event.key === 'Escape') {
  20. document.getElementsByClassName('next-btn')[1].click();
  21. }
  22.  
  23. });
  24.  
  25. })();