File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -522,15 +522,12 @@ try {
522522 let getImgList : InitOptions [ 'getImgList' ] | undefined ;
523523 if ( location . pathname . startsWith ( '/photos-slide-aid-' ) ) {
524524 getImgList = async ( ) => {
525- await wait ( ( ) => querySelector ( '#content img' ) ) ;
526- // 如果是单/双页模式,得先切换成下拉模式来显示所有图片
527- const nowMode = querySelector ( ':is(#btn-d, #btn-s).active' ) ;
528- if ( nowMode ) unsafeWindow . reader . setMode ( 'vertical' ) ;
529- const imgList = querySelectorAll < HTMLImageElement > (
530- '#content img' ,
531- ) . map ( ( e ) => e . getAttribute ( 'src' ) ! ) ;
532- nowMode ?. click ( ) ;
533- return imgList ;
525+ const id = location . pathname . match ( / - ( \d + ) .h t m l / ) ?. [ 1 ] ;
526+ if ( ! id ) throw new Error ( t ( 'site.changed_load_failed' ) ) ;
527+ const res = await request < string > ( `/photos-item-aid-${ id } .html` ) ;
528+ const reRes = res . responseText . match ( / " p a g e _ u r l " : ( \[ .+ \] ) , / ) ;
529+ if ( ! reRes ) throw new Error ( t ( 'site.changed_load_failed' ) ) ;
530+ return eval ( reRes [ 1 ] ) as string [ ] ; // oxlint-disable-line no-eval
534531 } ;
535532 } else if ( location . pathname . startsWith ( '/photos-slist-aid-' ) )
536533 getImgList = ( ) =>
You can’t perform that action at this time.
0 commit comments