您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Click next chapter in mangalib.me automatically
当前为
// ==UserScript== // @name Next chapter in mangalib.me automatically // @namespace http://tampermonkey.net/ // @version 1.0 // @description Click next chapter in mangalib.me automatically // @author Killua Kill // @icon https://www.google.com/s2/favicons?sz=64&domain=mangalib.me // @match https://ranobelib.me/* // @match https://mangalib.me/* // @license MIT // @grant none // ==/UserScript== (function() { 'use strict'; // Function to check if the button is visible on the screen function isButtonVisible() { var button = document.querySelectorAll('.reader-next__btn')[1]; var rect = button.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth) ); } // Function to click the button function clickButton() { var button = document.querySelectorAll('.reader-next__btn')[1]; button.click(); } // Check if the button is visible on the screen and click it if (isButtonVisible()) { clickButton(); } else { // If the button is not visible, wait for it to appear and then click it var observer = new MutationObserver(function(mutationsList) { for (var mutation of mutationsList) { if (mutation.type === 'childList' && isButtonVisible()) { clickButton(); observer.disconnect(); break; } } }); observer.observe(document.body, { childList: true, subtree: true }); } })();