Manga Loader (unmaintained)

Support for over 70 sites! Loads manga chapter into one page in a long strip format, supports switching chapters, minimal script with no dependencies, easy to implement new sites, loads quickly and works on mobile devices through bookmarklet

< Commentaires sur Manga Loader (unmaintained)

Question / commentaire

§
Posté le: 04/01/2017

Bato.to next/prev chapter fix

Hi,

e.g. for JoJo there are multiple scans, and the chapters are named differently by the different teams.

E.g. http://bato.to/reader#7ce057f98098e206 is “Vol.40 Ch.378: I Am an Alien! Part 1 (Official Color Scans)” and the next chapter should be “Vol.40 Ch.379: I Am an Alien! Part 2 (Official Color Scans)” ... but pressing next in Manga Loader produces “Vol.40 Ch.379: I Am An Alien! Part 2” in black and white by another team.

I have written an ugly hack that works. It uses the “Next Chapter” / “Previous Chapter” buttons.

--- mangaloader.js  2017-01-04 11:30:27.478511159 +0100
+++ mangaloader1.js 2017-01-04 11:30:52.349559567 +0100
@@ -185,8 +185,14 @@
   curchap: 'select[name=chapter_select]',
   numchaps: 'select[name=chapter_select]',
   nextchap: function(prev) {
-    var link = extractInfo('select[name=chapter_select]', {type: 'value', val: prev ? 1 : -1});
-    return link && link.replace(/https?/, document.location.href.split(':')[0]); // fix for batotos broken https pages
+    var menu = getEls('div.moderation_bar > ul > li', getEl('#reader'));
+    for (var i = 0; i != menu.length; i += 1) {
+      var img = getEl('img', menu[i]);
+      if (img && img.title == (prev ? "Previous Chapter" : "Next Chapter")) {
+        return img.parentNode.href;
+      }
+    }
+    return null;
   },
   prevchap: function() {
     return this.nextchap(true);
fuzetsuAuteur
§
Posté le: 04/02/2017

Sorry for taking so long to address this :sweat:

I tested out and added your fix in the latest version: https://greasyfork.org/en/scripts/692-manga-loader/diff?v1=173300&v2=171507

It's kind of weird how that batoto chapter switching stuff works. Even when directly using the chapter buttons like this it doesn't consistently switch to the right chapter when going backwards. I guess it's better though.

Poster une réponse

Connectez-vous pour poster une réponse.