您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Enables keyboard navigation for Solo Leveling manhwa reader.
// ==UserScript== // @name Solo Leveling Keyboard Navigation // @namespace http://tampermonkey.net/ // @version 0.1 // @description Enables keyboard navigation for Solo Leveling manhwa reader. // @author Chief Legend // @match https://www.solo-leveling-manhwa.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to simulate click on Prev or Next link function navigate(direction) { // Use XPath to find the Prev and Next links by their text content var prevLink = document.evaluate("//a[contains(text(),'Prev')]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; var nextLink = document.evaluate("//a[contains(text(),'Next')]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; // Simulate click on the appropriate link if (direction === 'prev' && prevLink) { prevLink.click(); } else if (direction === 'next' && nextLink) { nextLink.click(); } } // Add keydown event listener to the document document.addEventListener('keydown', function(event) { // Check if the left arrow key (ArrowLeft) or right arrow key (ArrowRight) was pressed if (event.key === 'ArrowLeft') { navigate('prev'); } else if (event.key === 'ArrowRight') { navigate('next'); } }); })();