Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit c291a00

Browse files
committed
Allow all content from Mangadex
1 parent a7c6cc3 commit c291a00

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/mangadex/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function formatTimestamp(timestamp) {
4646
}
4747

4848
function 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);

0 commit comments

Comments
 (0)