MCPcopy Create free account
hub / github.com/XIU2/UserScript / pageLoading

Function pageLoading

Zhiyoo-Enhanced.user.js:320–333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318
319 // 自动无缝翻页
320 function pageLoading() {
321 if (!menu_value('menu_pageLoading')) return
322 if (curSite.SiteTypeID > 0){
323 windowScroll(function (direction, e) {
324 if (direction === 'down') { // 下滑才准备翻页
325 let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
326 let scrollDelta = 666;
327 if (document.documentElement.scrollHeight <= document.documentElement.clientHeight + scrollTop + scrollDelta) {
328 ShowPager.loadMorePage();
329 }
330 }
331 });
332 }
333 }
334
335
336 // 滚动条事件

Callers 1

Calls 2

menu_valueFunction · 0.70
windowScrollFunction · 0.70

Tested by

no test coverage detected