66// @description Powerful picture viewing tool online, which can popup/scale/rotate/batch save pictures or find the HD original picture automatically
77// @description :zh-CN NLF 的围观图修改版,增加高清原图查找显示(在线看图工具,支持图片翻转、旋转、缩放、弹出大图、批量保存、查找原图)
88// @description :zh-TW NLF 的圍觀圖修改版,增加高清原圖查詢顯示(線上看圖工具,支援圖片翻轉、旋轉、縮放、彈出大圖、批量儲存、查詢原圖)
9- // @version 2017.4.25 .1
9+ // @version 2017.6.10 .1
1010// @created 2011-6-15
1111// @namespace http://userscripts.org/users/NLF
1212// @homepage http://hoothin.com
@@ -2717,6 +2717,7 @@ padding-left:24px;">'+shareItem.name+'</span>');
27172717 } ,
27182718 } ) ;
27192719 } else if ( eleMaps [ 'head-command-nextPage' ] . contains ( target ) ) {
2720+ self . completePages = [ ] ;
27202721 self . nextPage ( ) ;
27212722 } else if ( eleMaps [ 'head-command-collect' ] . contains ( target ) ) {
27222723 if ( collection . favorite ) {
@@ -3474,6 +3475,7 @@ padding-left:24px;">'+shareItem.name+'</span>');
34743475 }
34753476 return absolute_regex . test ( src ) ? src : ( ( src . charAt ( 0 ) == "/" ? root_domain : root_page ) + src ) ;
34763477 } ,
3478+ completePages :[ ] ,
34773479 nextPage :function ( ) {
34783480 var pageObj = this . getPage ( ) , self = this , textSpan = this . eleMaps [ 'head-command-nextPage' ] . querySelector ( "span" ) ;
34793481 textSpan . innerHTML = "正在加载" ;
@@ -3499,10 +3501,17 @@ padding-left:24px;">'+shareItem.name+'</span>');
34993501 if ( ! nextUrl ) return ;
35003502 }
35013503 }
3504+ var href = nextUrl . getAttribute ( "href" ) ;
3505+ if ( self . completePages . indexOf ( href ) != - 1 ) {
3506+ loadOver ( ) ;
3507+ return ;
3508+ } else {
3509+ self . completePages . push ( href ) ;
3510+ }
35023511 GM_xmlhttpRequest ( {
35033512 method : 'GET' ,
35043513 overrideMimeType :"text/html;charset=" + document . charset ,
3505- url : self . canonicalUri ( nextUrl . getAttribute ( " href" ) ) ,
3514+ url : self . canonicalUri ( href ) ,
35063515 onload : function ( d ) {
35073516 let html = document . implementation . createHTMLDocument ( '' ) ;
35083517 html . documentElement . innerHTML = d . responseText ;
0 commit comments