Old: v1.6.20 - 2015-06-15 - show exit button when autoload is enabled, set flag to stop autoload if exit button is pressed
New: v1.6.21 - 2015-06-18 -
- @@ -1,7 +1,7 @@
- // ==UserScript==
- // @name Manga Loader
- // @namespace http://www.fuzetsu.com/MangaLoader
-// @version 1.6.20
- +// @version 1.6.21
- // @description Loads manga chapter into one page in a long strip format, supports switching chapters and works for a variety of sites, minimal script with no dependencies, easy to implement new sites, loads quickly and works on mobile devices through bookmarklet
- // @copyright 2014+, fuzetsu
- // @noframes
- @@ -190,7 +190,7 @@
- curpage: 'select.cbo_wpm_pag',
- nextchap: function(prev) {
- var next = extractInfo('select.cbo_wpm_chp', {type: 'value', val: (prev ? 1 : -1)});
- if(next) return window.location.href.replace(/\/[0-9.]+(\/[0-9])?[^/]+$/, '/' + next);
- + if(next) return window.location.href.replace(/\/[0-9.]+\/?([0-9]+\/?)?[^/]*$/, '/' + next);
- },
- prevchap: function() {
- return this.nextchap(true);
- @@ -883,9 +883,9 @@
- document.head.innerHTML = '<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">';
- document.title = title;
- // navigation
- var nav = '<div class="ml-chap-nav">' + (prevChapter ? '<a class="ml-prev-chap" href="' + prevChapter + '">Prev Chapter</a> ' : '') +
- + var nav = '<div class="ml-chap-nav">' + (prevChapter ? '<a class="ml-chap-prev" href="' + prevChapter + '">Prev Chapter</a> ' : '') +
- '<a class="ml-exit" href="" data-exit="true">Exit</a> ' +
- (nextChapter ? '<a class="ml-next-chap" href="' + nextChapter + '">Next Chapter</a>' : '') + '</div>';
- + (nextChapter ? '<a class="ml-chap-next" href="' + nextChapter + '">Next Chapter</a>' : '') + '</div>';
- // message area
- var floatingMsg = '<pre class="ml-box ml-floating-msg"></pre>';
- // stats
- @@ -903,8 +903,8 @@
- btnManualReload: getEl('.ml-manual-reload'),
- btnInfo: getEl('.ml-info-button'),
- floatingMsg: getEl('.ml-floating-msg'),
- btnNextChap: getEl('.ml-next-chap'),
- btnPrevChap: getEl('.ml-prev-chap'),
- + btnNextChap: getEl('.ml-chap-next'),
- + btnPrevChap: getEl('.ml-chap-prev'),
- btnExit: getEl('.ml-exit')
- };
- // message func
- @@ -925,10 +925,10 @@
- // set up listeners
- document.addEventListener('click', function(evt) {
- if (evt.target.nodeName === 'A') {
- if(evt.target.className.indexOf('ml-chap-nav') !== -1 && evt.target.parentNode.className.indexOf('ml-chap-nav') !== -1) {
- + if(evt.target.className.indexOf('ml-chap') !== -1) {
- log('next chapter will autoload');
- storeSet('autoload', 'yes');
- } else if(evt.target.className.indexOf('ml-exit') !== -1 || evt.target.parentNode.className.indexOf('ml-exit') !== -1) {
- + } else if(evt.target.className.indexOf('ml-exit') !== -1) {
- log('exiting chapter, stop autoload');
- storeSet('autoload', 'no');
- }