Old: v1.10.4 - 2016-08-19 - thanks to @nobody123 for this update: "Fix nextchap, prevchap, and auto-loading for dm5 Fix for auto-loading hotkey"
New: v1.10.5 - 2016-08-23 - added otakusmash and fixed small bug with loading manga on last page when next match was undefined
- @@ -1,7 +1,7 @@
- // ==UserScript==
- // @name Manga Loader
- // @namespace http://www.fuzetsu.com/MangaLoader
-// @version 1.10.4
- +// @version 1.10.5
- // @description 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
- // @copyright 2016+, fuzetsu
- // @noframes
- @@ -65,6 +65,7 @@
- // @match *://*.comicastle.org/read-*
- // @match *://*.mymh8.com/chapter/*
- // @match *://*.unionmangas.net/leitor/*
- +// @match *://*.otakusmash.com/*/*
- // -- FOOLSLIDE START
- // @match *://manga.redhawkscans.com/reader/read/*
- // @match *://reader.s2smanga.com/read/*
- @@ -1055,6 +1056,23 @@
- });
- return W.pages && W.pages.length > 0;
- }
- +}, {
- + name: 'otakusmash',
- + match: "https?://www\\.otakusmash\\.com/(read-comics|read-manga)/.+",
- + img: 'img.picture',
- + next: 'select[name=page] + a',
- + curpage: 'select[name=page]',
- + numpages: 'select[name=page]',
- + nextchap: function(prev) {
- + var nextChap = extractInfo('select[name=chapter]', {type: 'value', val: prev ? 1 : -1});
- + return nextChap ? location.href.replace(/(read-(comics|manga)\/[^\/]+).*/, '$1/' + nextChap) : null;
- + },
- + prevchap: function() {
- + return this.nextchap(true);
- + },
- + numchaps: 'select[name=chapter]',
- + curchap: 'select[name=chapter]',
- + invchap: true
- }];
- // END OF IMPL
-
- @@ -1720,7 +1738,7 @@
- pagesLoaded += 1;
- updateStats();
- });
- if(!next) throw new Error('failed to retrieve next url for page ' + curPage);
- + if(!next && curPage < numPages) throw new Error('failed to retrieve next url for page ' + curPage);
- loadNextPage(next);
- },
- updateStats = function() {
- @@ -1785,7 +1803,7 @@
- count = 1,
- pagesLoaded = curPage - 1,
- lastUrl, UI, resumeUrl;
- if (!imgUrl || !nextUrl) {
- + if (!imgUrl || (!nextUrl && curPage < numPages)) {
- log('failed to retrieve ' + (!imgUrl ? 'image url' : 'next page url'), 'exit');
- }
-