DakuTree / manga-tracker

A cross-site manga-tracker.
https://trackr.moe
GNU General Public License v2.0
96 stars 15 forks source link

MangaRock support #240

Closed doutatsu closed 6 years ago

doutatsu commented 6 years ago

Was wondering if there are plans to add support for MangaRock? I've been using it more and more, it has great potential and more stable than MangaFox at this point.

Vesnyx commented 6 years ago
/**
     * MangaRock
     * @type {SiteObject}
     */
    'mangarock.com' : extendSite({
        preInit : function(callback) {
            let dfd = $.Deferred();
            let checkSelector = setInterval(function () {
                if ($('._3Oahl').text() !== '') {
                    //AJAX has loaded, resolve deferred.
                    dfd.resolve();
                    clearInterval(checkSelector);
                } else {
                    console.log('trackr - Waiting for initial page load...');
                }
            }, 1000);
            dfd.done(() => {
                callback();
            });
        },
        setObjVars : function() {
            let _this = this;
            this.segments    = window.location.pathname.split( '/' );
            //FIXME: Is there a better way to do this? It just feels like an ugly way of setting vars.
            //this.page_count    = $('.list-switcher-2 > li > select[name=category_type]').get(0).length;
            this.title         = this.segments[2];
            this.chapter       = this.segments[4];

            this.title_url   = this.https + '://mangarock.com/manga/' + this.title;
            this.chapter_url = this.title_url + '/chapter/' + this.chapter;

            let tempList = generateChapterList($('._3Oahl.ll5Bk > select:first > option'), 'value');
            this.chapterList = Object.keys(tempList).reduce(function(result, key) {
                result[_this.title_url + '/chapter/' + key] = tempList[key];
                return result;
            }, {});
            this.chapterListCurrent = this.chapter_url;
        }
    }),

Here's some UserScript code. That'll just set the list up. Still debating whether or not I should try to make into a proper viewer, or do something more like WebToons/GoS. Which would you guys prefer @DakuTree and @doutatsu .

and the include code: // @include /^https?:\/\/mangarock\.com\/manga\/.*?\/chapter\/(.*)?$/

doutatsu commented 6 years ago

I think the list and ability to track is enough. MangaRock has a good viewer, which handles both horizontal and vertical viewing.

doutatsu commented 6 years ago

So any progress on this? I'd want to start using MangaRock instead of Batoto rather than MangaFox

Vesnyx commented 6 years ago

Sorry, school just started for me again so I haven't had any time to work on it recently. If the viewer is fine, then the only thing that needs to be addressed is the PHP tracker backend and the corresponding additional CSS and images.

DakuTree commented 6 years ago

Support has been added as per the above commit.

Going to leave this issue open as there is still two issues:

Edit: I also forgot to mention that I've left the MangaRock reader in rather than use our own, as it seems pretty decent. Only complaint is you can't force vertical view by default..

rjbs91 commented 6 years ago

I'm getting an "Unable to update" error when trying to add some series from MangaRock. Is this supposed to happen for now?

DakuTree commented 6 years ago

What series?

rjbs91 commented 6 years ago

Ubel Blatt Kaguya-sama wa Kokurasetai: Tensai-tachi no Renai Zunousen Konya wa Tsuki ga Kirei desu ga, Toriaezu Shine Gintama Karneval Prison School Bungou Stray Dogs

These are the ones I know. There may be way more series with this problem.

DakuTree commented 6 years ago

Try now. Forgot a slash in the chapter format which was causing series with volumes to fail.

rjbs91 commented 6 years ago

Thanks. It's working now.

DakuTree commented 6 years ago

Closing this as the two remaining issues have been split into separate issues (#276 & #277).