Greasy Fork is available in English.
笔趣阁小说阅读时,当到达底部指定秒数后自动点击下一章
当前为
// ==UserScript==
// @name 笔趣阁小说阅读到达底部自动翻页
// @namespace [email protected]
// @include http://www.cits0871.com/*
// @include https://www.xxbiquge.com/*
// @license MIT
// @grant no
// @version 1.6
// @run-at document-end
// @description 笔趣阁小说阅读时,当到达底部指定秒数后自动点击下一章
// @require http://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript==
(function () {
xh()//1.执行自动循环翻页
function xh(){
setTimeout(function(){//延迟器
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
var clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
if(scrollHeight > clientHeight && scrollTop + clientHeight === scrollHeight) {//到达底部
setTimeout(function(){//延迟器
xyz();
},10000)
}
xh();
},3000)
}
//2.手动执行翻页
$(document).keydown(function(event){
if(event.keyCode == 32){//监听空格键,当到达底部并且空格键按下自动翻页
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
var clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
if(scrollHeight > clientHeight && scrollTop + clientHeight === scrollHeight) {
xyz();
}
}
if(event.keyCode == 39 ){//监听右箭头,按下自动翻页
xyz();
}
});
function xyz(){//翻页点击
if(document.getElementsByClassName("bottem2")[0].children[3].text=='下一章'){
document.getElementsByClassName("bottem2")[0].children[3].click();
}else if(document.getElementsByClassName("bottem2")[0].children[2].text=='下一章'){
document.getElementsByClassName("bottem2")[0].children[2].click();
}else{
document.getElementsByClassName("bottem2")[0].children[4].click();
}
}
document.getElementsByClassName("header_logo")[0].style.display='none';
document.getElementsByClassName("logo")[0].style.display='none';
})();