Skip to content

Commit

Permalink
fix: 调整了浏览的速度
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Mar 11, 2024
1 parent 39851c3 commit e85425f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index_passage_list.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Auto Read
// @namespace http://tampermonkey.net/
// @version 0.2
// @version 0.4
// @description 自动刷linuxdo文章
// @author liuweiqing
// @match https://linux.do/*
Expand All @@ -20,10 +20,10 @@

function scrollToBottomSlowly(
stopDistance = 9999999999,
callback = undefined
callback = undefined,
distancePerStep = 20,
delayPerStep = 50
) {
const distancePerStep = 20;
const delayPerStep = 20;
if (scrollInterval !== null) {
clearInterval(scrollInterval);
}
Expand Down Expand Up @@ -94,7 +94,9 @@
//先随机滚动一段距离然后再查找链接
scrollToBottomSlowly(
Math.random() * document.body.offsetHeight * 3,
searchLinkClick
searchLinkClick,
20,
20
);
} else {
console.log("执行正常的滚动和检查逻辑");
Expand Down

0 comments on commit e85425f

Please sign in to comment.