File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010// @name :it Pagetual
1111// @name :ko 東方永頁機
1212// @namespace hoothin
13- // @version 1.6.8.16
13+ // @version 1.6.8.17
1414// @description Perpetual pages - Most powerful Auto Pager script. Auto loading next paginated web pages and inserting into current page.
1515// @description :zh-CN 自动翻页脚本 - 自动加载并拼接下一分页内容,无需规则驱动支持任意网页
1616// @description :zh-TW 自動翻頁脚本 - 自動加載並拼接下一分頁內容,無需規則驅動支持任意網頁
28092809 curIframe . style . height = iframeDoc . body . scrollHeight + "px" ;
28102810 curIframe . style . width = iframeDoc . body . scrollWidth + "px" ;
28112811 } ) ;
2812- let inAction = false ;
2812+ let inAction = false , checkTimes = 0 ;
28132813 let forceRefresh = e => {
28142814 if ( inAction || ! iframeDoc ) return ;
28152815 inAction = true ;
28292829 setTimeout ( ( ) => {
28302830 inAction = false ;
28312831 if ( ! ruleParser . nextLinkHref ) {
2832+ checkTimes ++ ;
28322833 ruleParser . getNextLink ( iframeDoc ) ;
28332834 if ( ruleParser . nextLinkHref ) {
28342835 foundNext ( ) ;
2836+ } else if ( checkTimes >= 10 ) {
2837+ foundNext ( ) ;
28352838 }
28362839 } else {
28372840 foundNext ( ) ;
28382841 }
2839- } , 100 ) ;
2842+ } , 50 ) ;
28402843 } ;
28412844 document . addEventListener ( "scroll" , forceRefresh ) ;
28422845 curIframe . src = url ;
You can’t perform that action at this time.
0 commit comments