東方永頁機

페이지가 매겨진 다음 웹 페이지를 자동으로 로드하고 현재 페이지에 삽입합니다. 규칙 없이 수천 개의 웹 사이트를 지원합니다.

< 東方永頁機 피드백으로 돌아가기

리뷰: 좋음 - 스크립트가 잘 작동함

§
게시: 2022-10-09

(能把这个代码整合进去吗?
function(){
window.isAutoTurnPage = true;

document.querySelector("body > div.container > div:nth-child(4)").innerHTML = document.querySelector("body > div.container > div:nth-child(4)").innerHTML+"自动翻页:true";
var button = document.querySelector("body > div.container > div:nth-child(4) > button");
button.onclick = function(){
window.isAutoTurnPage = window.isAutoTurnPage==true?false:true;
document.querySelector("body > div.container > div:nth-child(4) > button").innerText = "自动翻页:"+window.isAutoTurnPage.toString();
}

$(window).scroll(function(){
  var scrollTop = $(this).scrollTop();
  var scrollHeight = $(document).height();
  var windowHeight = $(this).height();
  if(window.isAutoTurnPage == true && scrollTop + windowHeight >= scrollHeight && document.querySelector("body > div.container > h1") != null){
  //当滚动到底部时,执行此代码框中的代码
    //alert("you are in the bottom");
var list = document.querySelector("#ChapterView > div.bd > div > div > center");
var count = list.childElementCount;
var flag = 0;
for(var i = 1;i<=count;i++){
if(list.children[i-1].className == "curr"){
flag = i;
}
}
if(flag div.bd > div > div > center > a:nth-child("+(flag+1).toString()+")").click();
}
else{
document.querySelector("body > div.container > div.mod.page-control > div > a.next").click();
}
   }
});

/*window.changeState = function(){

}*/
}
)()

답글 게시

답글을 게시하려면 로그인하세요.