MCPcopy Index your code
hub / github.com/hoothin/UserScripts / clickNext

Function clickNext

Pagetual/pagetual.user.js:11714–11730  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11712 clickMode = typeof ruleParser.curSiteRule.clickMode == 'undefined' ? rulesData.clickMode : ruleParser.curSiteRule.clickMode;
11713 let clickingNext = false;
11714 let clickNext = async () => {
11715 if (clickingNext) return;
11716 clickingNext = true;
11717 setTimeout(() => {
11718 clickingNext = false;
11719 }, 1500);
11720 let nextLink = ruleParser.nextLinkHref;
11721 if (!nextLink) return;
11722 let isJs = ruleParser.hrefIsJs(nextLink);
11723 if (isJs) {
11724 let nextBtn = ruleParser.nextLinkEle;
11725 if (!nextBtn || !nextBtn.offsetParent) nextBtn = await ruleParser.getNextLink(document, true);
11726 if (nextBtn) emuClick(nextBtn);
11727 } else {
11728 window.location.href = nextLink;
11729 }
11730 };
11731 let checkScrollReach = () => {
11732 let dist = distToBottom();
11733 if (clickMode) {

Callers 2

checkScrollReachFunction · 0.85
initListenerFunction · 0.85

Calls 3

hrefIsJsMethod · 0.80
getNextLinkMethod · 0.80
emuClickFunction · 0.70

Tested by

no test coverage detected