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

Add navigation hotkeys for catalogue archive

// ==UserScript==
// @name         Hotkeys for next page/previous page on christmas.musetechnical.com
// @version      1.0
// @description  Add navigation hotkeys for catalogue archive
// @author       CodeFox
// @namespace    https://github.com/ChristopherLeitner
// @match        https://christmas.musetechnical.com/*
// @grant        none
// @license MIT
// @run-at       document-body
// ==/UserScript==

document.addEventListener('keydown', function(event) {
    if (event.code === 'ArrowRight') {
        var nextBtn = document.querySelector("#btnNextPage");
        if (nextBtn) {
          	console.log("Going to next page");
            nextBtn.click();
        }
    }
    if (event.code === 'ArrowLeft') {
        var prevBtn = document.querySelector("#btnPrevPage");
        if (prevBtn) {
            prevBtn.click();
        }
    }
}, true);

QingJ © 2025

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