Hotkeys for next page/previous page on christmas.musetechnical.com

Add navigation hotkeys for catalogue archive

  1. // ==UserScript==
  2. // @name Hotkeys for next page/previous page on christmas.musetechnical.com
  3. // @version 1.0
  4. // @description Add navigation hotkeys for catalogue archive
  5. // @author CodeFox
  6. // @namespace https://github.com/ChristopherLeitner
  7. // @match https://christmas.musetechnical.com/*
  8. // @grant none
  9. // @license MIT
  10. // @run-at document-body
  11. // ==/UserScript==
  12.  
  13. document.addEventListener('keydown', function(event) {
  14. if (event.code === 'ArrowRight') {
  15. var nextBtn = document.querySelector("#btnNextPage");
  16. if (nextBtn) {
  17. console.log("Going to next page");
  18. nextBtn.click();
  19. }
  20. }
  21. if (event.code === 'ArrowLeft') {
  22. var prevBtn = document.querySelector("#btnPrevPage");
  23. if (prevBtn) {
  24. prevBtn.click();
  25. }
  26. }
  27. }, true);

QingJ © 2025

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