navigation asura scans

specifically for asura scans, navigate left and right for prev and next respectively using left and right arrow keys

目前為 2023-01-12 提交的版本,檢視 最新版本

// ==UserScript==
// @name         navigation asura scans
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  specifically for asura scans, navigate left and right for prev and next respectively using left and right arrow keys
// @author       icycoldveins
// @match        *://*.asura.gg/*
// @match        *://*.asurascans.com/*
// @license      MIT
// @icon         none
// @grant        none
// ==/UserScript==

(function () {
  "use strict";

  // Your code here...
  // ch-next-btn
  // ch-prev-btn
  //next page-numbers
  //prev page-numbers

  // navigate using arrow left key and arrow right key
  document.addEventListener("keydown", function (event) {
    if (event.key == "ArrowLeft") {
        // if class ch-prev-btn exists, click it else click prev page-numbers
        if (document.getElementsByClassName("ch-prev-btn")[0]) {
            document.getElementsByClassName("ch-prev-btn")[0].click();
        }
        else {
            document.getElementsByClassName("prev page-numbers")[0].click();
        }
    }
    if (event.key == "ArrowRight") {
        // if class ch-next-btn exists, click it else click next page-numbers
        if (document.getElementsByClassName("ch-next-btn")[0]) {
            document.getElementsByClassName("ch-next-btn")[0].click();
        }
        else {
            document.getElementsByClassName("next page-numbers")[0].click();
        }
    }
    });
})();

QingJ © 2025

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