File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ Cotrans 也有自己的油猴脚本 —— 「[Cotrans 漫画/图片翻译器](h
217217- [ HentaiZap] ( https://hentaizap.com )
218218- [ 最前線] ( https://sai-zen-sen.jp )
219219- [ Tachidesk] ( https://github.com/Suwayomi/Tachidesk-Sorayomi )
220+ - [ LANraragi] ( https://github.com/Difegue/LANraragi )
220221
221222<!-- supportSiteList -->
222223
Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ Cotrans 也有自己的油猴脚本 —— 「[Cotrans 漫画/图片翻译器](h
217217- [ HentaiZap] ( https://hentaizap.com )
218218- [ 最前線] ( https://sai-zen-sen.jp )
219219- [ Tachidesk] ( https://github.com/Suwayomi/Tachidesk-Sorayomi )
220+ - [ LANraragi] ( https://github.com/Difegue/LANraragi )
220221
221222<!-- supportSiteList -->
222223
Original file line number Diff line number Diff line change @@ -1036,7 +1036,34 @@ try {
10361036 } ) ;
10371037 } , 500 ) ,
10381038 } ;
1039- } else {
1039+ }
1040+
1041+ // #[LANraragi](https://github.com/Difegue/LANraragi)
1042+ const LANraragiNode = document . querySelector (
1043+ '.ip > a[href="https://github.com/Difegue/LANraragi"]' ,
1044+ ) ;
1045+ if ( LANraragiNode && LANraragiNode . textContent . trim ( ) === 'LANraragi.' ) {
1046+ if ( location . pathname !== '/reader' ) break ;
1047+
1048+ const id = new URLSearchParams ( location . search ) . get ( 'id' ) ;
1049+ if ( ! id ) {
1050+ toast . error ( t ( 'site.changed_load_failed' ) ) ;
1051+ break ;
1052+ }
1053+
1054+ options = {
1055+ name : 'LANraragi' ,
1056+ async getImgList ( ) {
1057+ const res = await request < { pages : string [ ] } > (
1058+ `/api/archives/${ id } /files` ,
1059+ { responseType : 'json' } ,
1060+ ) ;
1061+ return res . response . pages ;
1062+ } ,
1063+ } ;
1064+ }
1065+
1066+ if ( ! options ) {
10401067 ( async ( ) => {
10411068 if ( ( await GM . getValue ( location . hostname ) ) !== undefined )
10421069 return requestIdleCallback ( otherSite ) ;
You can’t perform that action at this time.
0 commit comments