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

Commit ed0a2c9

Browse files
Fixed issues with managnelo plugin
1 parent e25ab25 commit ed0a2c9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

plugins/manganelo/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ function listChapters(query) {
3838
var uploadNode = mango.css(element, "span.chapter-time")[0];
3939

4040
var mangaChapterNumber;
41-
var mangaChapterLink;
4241
try {
4342
var url = mango.attribute(linkNode, "href");
4443

45-
var mangaChapterLink = mango.attribute(linkNode, "href");
46-
// Extract yyy(.yy) from: https://manganelo.com/chapter/xxxxxxxx/chapter_yyy.yy
44+
// Extract yyy(.yy) from: https://readmanganato.com/manga-xxxxx/chapter-yyy(.yy)
4745
mangaChapterNumber = /chapter-((\d+.?)*)/.exec(url)[1];
4846

4947
// Replace '.' with '_', since ids can't contain '.'
@@ -52,7 +50,7 @@ function listChapters(query) {
5250
mango.raise("Failed to get chapter number.");
5351
}
5452

55-
var chapterID = mangaID + "chapter" + mangaChapterNumber // Create ID as xxxxxxxxchyyy(_yy)
53+
var chapterID = mangaID + "chapter" + mangaChapterNumber // Create ID as xxxxxxxxchapteryyy(_yy)
5654
var chapterTitle = mango.text(linkNode);
5755
var chapterUploadedTime = mango.attribute(uploadNode, "title");
5856

@@ -71,11 +69,11 @@ function listChapters(query) {
7169

7270
function selectChapter(id) {
7371
var mangaIDMatch = /(.*?)chapter((\d_?)*)/.exec(id); // Extract xxxxxxxx & yyy(_yy) from ID.
74-
var mangaID = 'manga-' + mangaIDMatch[1];
75-
var mangaChapterNumber = 'chapter-' + mangaIDMatch[2].replace(/\_/, "."); // Convert '_' back to '.'
72+
var mangaID = mangaIDMatch[1];
73+
var mangaChapterNumber = mangaIDMatch[2].replace(/\_/, "."); // Convert '_' back to '.'
7674

77-
// Create URL formatted like https://manganelo.com/chapter/xxxxxxxx/chapter_yyy.yy
78-
var mangaURL = MAIN_URL + mangaID + "/" + mangaChapterNumber;
75+
// Create URL formatted like https://readmanganato.com/manga-xxxxxxxx/chapter-yyy.yy
76+
var mangaURL = MAIN_URL + "manga-" + mangaID + "/chapter-" + mangaChapterNumber;
7977

8078
var html = mango.get(mangaURL).body;
8179

0 commit comments

Comments
 (0)