Skip to content

Commit

Permalink
Fixed next/prev chapter for mangadex.com
Browse files Browse the repository at this point in the history
  • Loading branch information
kyuucr committed Jan 25, 2018
1 parent 618df64 commit 39e3ec9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions manga-loader.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,15 +671,22 @@ var implementations = [{
match: "^https?://mangadex\\.com/chapter/[^/]+",
img: '#current_page',
next: function() {
return this._base + ++this._page;
return this._chap + ++this._page;
},
numpages: '#jump_page',
curpage: '#jump_page',
nextchap: '#jump_chapter',
prevchap: '#jump_chapter',
nextchap: function() {
var chapter = document.querySelector('#jump_chapter').selectedOptions[0].nextElementSibling;
return (chapter === null) ? false : (this._base + chapter.value + '/1');
},
prevchap: function() {
var chapter = document.querySelector('#jump_chapter').selectedOptions[0].previousElementSibling;
return (chapter === null) ? false : (this._base + chapter.value + '/1');
},
wait: function() {
var chapter = document.querySelector('#jump_chapter').selectedOptions[0].value;
this._base = 'https://mangadex.com/chapter/' + chapter + '/';
this._base = 'https://mangadex.com/chapter/';
this._chap = this._base + chapter + '/';
this._page = 1;
return true;
}
Expand Down

0 comments on commit 39e3ec9

Please sign in to comment.