MCPcopy Index your code
hub / github.com/XIU2/UserScript / getNextEP

Function getNextEP

Autopage.user.js:2134–2151  ·  view source on GitHub ↗
(css, pf, reg)

Source from the content-addressed store, hash-verified

2132 }
2133 // 通用型获取下一页地址(从 元素 中获取页码,URL 替换 page= 参数)
2134 function getNextEP(css, pf, reg) {
2135 let nextNum = getOne(css), url = '';
2136 if (nextNum && nextNum.textContent) {
2137 nextNum = nextNum.textContent.replaceAll(' ','');
2138 if (location.search) {
2139 if (indexOF(pf, 's')) {
2140 url = location.search.replace(reg, pf + nextNum);
2141 } else {
2142 url = location.search + '&' + pf + nextNum;
2143 }
2144 } else {
2145 url = '?' + pf + nextNum;
2146 }
2147 url = location.origin + location.pathname + url;
2148 }
2149 //console.log('111', url)
2150 return url
2151 }
2152 // 通用型获取下一页地址(直接给定页码,URL 替换 page= 参数)
2153 function getNextSP(page, pf, reg) {
2154 let url = '';

Callers

nothing calls this directly

Calls 2

getOneFunction · 0.85
indexOFFunction · 0.85

Tested by

no test coverage detected