This repository was archived by the owner on Mar 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ function formatTimestamp(timestamp) {
4646}
4747
4848function searchManga ( query ) {
49- const res = mango . get ( 'https://api.mangadex.org/manga?title=' + encodeURIComponent ( query ) ) ;
49+ const res = mango . get ( 'https://api.mangadex.org/manga?title=' + encodeURIComponent ( query ) + '&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic' ) ;
5050 if ( res . status_code !== 200 )
5151 mango . raise ( 'Failed to search for manga. Status ' + res . status_code ) ;
5252 const manga = JSON . parse ( res . body ) . data ;
@@ -89,6 +89,8 @@ function listChapters(id) {
8989 url += 'limit=' + limit . trim ( ) + '&' ;
9090 }
9191
92+ url += 'contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&' ;
93+
9294 const res = mango . get ( url ) ;
9395 if ( res . status_code !== 200 )
9496 mango . raise ( 'Failed to list chapters. Status ' + res . status_code ) ;
@@ -115,6 +117,8 @@ function newChapters(mangaId, after) {
115117 url += 'limit=' + limit . trim ( ) + '&' ;
116118 }
117119
120+ url += 'contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&' ;
121+
118122 const res = mango . get ( url ) ;
119123 if ( res . status_code !== 200 )
120124 mango . raise ( 'Failed to list new chapters. Status ' + res . status_code ) ;
You can’t perform that action at this time.
0 commit comments