anka-213 / webcomic_reader

Webcomic Reader userscript at
https://openuserjs.org/scripts/anka-213/Webcomic_Reader
MIT License
120 stars 27 forks source link

mangahere.co is broken #16

Closed Darayavaush closed 8 years ago

Darayavaush commented 8 years ago

After intially loading the page, WCR loads the next two pages and then shows 'Loading…' icon forever. There are some random exceptions of normally working manga, but 90+% is bugged like this.

anka-213 commented 8 years ago

@Darayavaush I only seem to find the random examples of normally working manga. :/ Can you link to one that doesn't work?

Darayavaush commented 8 years ago

Hm, I found the reason. I have a second userscript that binds scrolling to going to next/previous page with the following code:

$('body').bind('DOMMouseScroll', function(e) {
    e.preventDefault();
    if (e.originalEvent.detail < 0) {
        $('#wcr_btn-1').click();
    }
    else {
        $('#wcr_btn1').click();
    }
});

I thought this was a bug of Mangahere because this script is active on several sites, but only Mangahere has this problem. Additionally, the stops loading the next pages only when I actually use the scroll to go to last accessible page - if I click on WCR's next/previous button manually, the pages load as expected. Why would this happen, and only on one site?

Tmp341 commented 8 years ago

@Darayavaush probably mangahere has a script messing with your one. Try noscript extension with exception of webcomic reader. If it works without a problem, then my theory is correct.

Darayavaush commented 8 years ago

@Tmp341 Yep, that helped. I still don't understand why Mangahere worked this way (scrolling was not prevented (I could still switch between pages just fine), but doing so stopped preload), but this is moving outside the scope of WCR. Thanks!