Commit 61b8b061 authored by dhomo's avatar dhomo Committed by Duhoux Pierre-Louis

Patch readmanga mintmanga

parent b603e30f
...@@ -37,7 +37,7 @@ if (typeof registerMangaObject === "function") { ...@@ -37,7 +37,7 @@ if (typeof registerMangaObject === "function") {
str = str.split("/")[1]; str = str.split("/")[1];
if (str === mng_nm) { if (str === mng_nm) {
res[res.length] = [ res[res.length] = [
$($(this).contents()[0]).text(), this.innerText.match(/\u000a\s+(.*)/g)[1].trim(),
"http://readmanga.me" + $(this).attr("href") "http://readmanga.me" + $(this).attr("href")
]; ];
} }
...@@ -52,11 +52,9 @@ if (typeof registerMangaObject === "function") { ...@@ -52,11 +52,9 @@ if (typeof registerMangaObject === "function") {
return doc return doc
}, },
getInformationsFromCurrentPage: async function (doc, curUrl) { getInformationsFromCurrentPage: async function (doc, curUrl) {
doc = await this.passAdult(doc, curUrl)
var name = $($("#mangaBox h1 a:first-child", doc).contents()[0]).text(); var name = $($("#mangaBox h1 a:first-child", doc).contents()[0]).text();
var nameurl = "http://readmanga.me" + $("#mangaBox h1 a:first-child", doc).attr("href"); var nameurl = "http://readmanga.me" + $("#mangaBox h1 a:first-child", doc).attr("href");
var chapurl = "http://readmanga.me" + $("#chapterSelectorSelect:first option:selected", doc).val(); var chapurl = curUrl.split("?")[0] + "?mtr=1";
return { return {
"name": name, "name": name,
"currentMangaURL": nameurl, "currentMangaURL": nameurl,
......
...@@ -37,7 +37,7 @@ if (typeof registerMangaObject === "function") { ...@@ -37,7 +37,7 @@ if (typeof registerMangaObject === "function") {
str = str.split("/")[1]; str = str.split("/")[1];
if (str === mng_nm) { if (str === mng_nm) {
res[res.length] = [ res[res.length] = [
$($(this).contents()[0]).text(), this.innerText.match(/\u000a\s+(.*)/g)[1].trim(),
"http://mintmanga.com" + $(this).attr("href") "http://mintmanga.com" + $(this).attr("href")
]; ];
} }
...@@ -52,11 +52,9 @@ if (typeof registerMangaObject === "function") { ...@@ -52,11 +52,9 @@ if (typeof registerMangaObject === "function") {
return doc return doc
}, },
getInformationsFromCurrentPage: async function (doc, curUrl) { getInformationsFromCurrentPage: async function (doc, curUrl) {
doc = await this.passAdult(doc, curUrl)
var name = $($("#mangaBox h1 a:first-child", doc).contents()[0]).text(); var name = $($("#mangaBox h1 a:first-child", doc).contents()[0]).text();
var nameurl = "http://mintmanga.com" + $("#mangaBox h1 a:first-child", doc).attr("href"); var nameurl = "http://mintmanga.com" + $("#mangaBox h1 a:first-child", doc).attr("href");
var chapurl = "http://mintmanga.com" + $("#chapterSelectorSelect:first option:selected", doc).val(); var chapurl = curUrl.split("?")[0] + "?mtr=1";
return { return {
"name": name, "name": name,
"currentMangaURL": nameurl, "currentMangaURL": nameurl,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment