Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MangaInn.js #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions MangaInn.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ var MangaInn = {
canListFullMangas : false,
languages : "en",
isMe : function (url) {
return (url.indexOf("mangainn.me/") !== -1);
return (url.indexOf("mangainn.net/") !== -1);
},
getMangaList : function (search, callback) {
$.ajax({
url : "http://www.mangainn.me/advresults",
url : "http://www.mangainn.net/advresults",
type : 'POST',
data : {
"seriestype" : "c",
Expand All @@ -26,7 +26,7 @@ var MangaInn = {
div.innerHTML = objResponse.replace(/<img/gi, '<noload');
var res = [];
$(".content .TurqHeadLabel", div).each(function (index) {
res[res.length] = [$(this).text().trim(), 'http://www.mangainn.me/manga/' + $(this).attr("onclick").toString().replace("function onclick(event) {", "").replace("MangaInfo", "").replace("}", "").replace("('", "").replace("')", "").trim()];
res[res.length] = [$(this).text().trim(), 'http://www.mangainn.net/manga/' + $(this).attr("onclick").toString().replace("function onclick(event) {", "").replace("MangaInfo", "").replace("}", "").replace("('", "").replace("')", "").trim()];
});
res.sort(function (a, b) {
return ((a[0].toLowerCase() < b[0].toLowerCase()) ? -1 : ((a[0] === b[0]) ? 0 : 1));
Expand Down Expand Up @@ -59,13 +59,13 @@ var MangaInn = {
});
},
isCurrentPageAChapterPage : function (doc, curUrl) {
return (curUrl.search('www.mangainn.me/manga/chapter') > -1);
return (curUrl.search('www.mangainn.net/manga/chapter') > -1);
},
getInformationsFromCurrentPage : function (doc, curUrl, callback) {
var name = $('#gotoMangaInfo', doc).text();
var currentChapter = $('#chapters option:selected', doc).text().replace(name, '').trim();
var currentMangaURL = $('#gotoMangaInfo', doc).attr('href');
var currentChapterURL = "http://www.mangainn.me/manga/chapter/" + $("#chapters option:selected", doc).val();
var currentChapterURL = "http://www.mangainn.net/manga/chapter/" + $("#chapters option:selected", doc).val();
callback({
"name" : name,
"currentChapter" : currentChapter,
Expand Down Expand Up @@ -113,13 +113,13 @@ var MangaInn = {
},
nextChapterUrl : function (select, doc, curUrl) {
if ($(select).children("option:selected").next().size() !== 0) {
return "http://www.mangainn.me/manga/chapter/" + $(select).children("option:selected").next().val();
return "http://www.mangainn.net/manga/chapter/" + $(select).children("option:selected").next().val();
}
return null;
},
previousChapterUrl : function (select, doc, curUrl) {
if ($(select).children("option:selected").prev().size() !== 0) {
return "http://www.mangainn.me/manga/chapter/" + $(select).children("option:selected").prev().val();
return "http://www.mangainn.net/manga/chapter/" + $(select).children("option:selected").prev().val();
}
return null;
},
Expand All @@ -136,4 +136,4 @@ var MangaInn = {
// Call registerMangaObject to be known by includer
if (typeof registerMangaObject == 'function') {
registerMangaObject("MangaInn", MangaInn);
}
}