Greasy Fork is available in English.

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

< Spätná väzba na Manga Loader (unmaintained)

Otázka/komentár

§
Pridaný: 24.10.2015
Upravený: 24.10.2015

Mangafox changed

Mangafox changed it's CDNs and they have onerror patch on each image. I tried to make a fix for your script, and in the end it was too hard. So I made a fix for another script but I don't like their interface and excessive jQuery usage.

They generally have two tries on any image img and altimg

function getStr(str, from, to) {
    return str.substring(str.indexOf(from) + from.length, str.indexOf(to) + to.length);
}
var image = $(html).find('img'),
    src = image[0].src,
    altImg = image[0].onerror.toString(),
    altSrc = getStr(altImg, '.src=\'', '.jpg');
addAltImg(i, src);
addImg(i, altSrc);

Could you add this fix to mangafox part? Thank you!

fuzetsuAutor
§
Pridaný: 26.10.2015

SHould be fixed in v1.9.6. You were pretty much on the right track there just that my script works receives the URLs a little bit different.

  img: function(ctx) {
  	var img = getEl('#image', ctx);
  	return img.getAttribute('onerror').match(/'([^']+)'/)[1];
  }

In this case all I had to change was the img selector a function that got the url out of the onerror attribute.

§
Pridaný: 26.10.2015

They might fix their CDN, that's why I suggested to use two images one as primary and one as secondary if primary fails....

§
Pridaný: 26.10.2015

And thanks for the code )

fuzetsuAutor
§
Pridaný: 26.10.2015

I don't have any handling for alternate src's yet, since it doesn't apply to most sites. Even if they fix their cdn as long as the onerror src works then it should be fine. I'll have to keep an eye on it though.

Pridať odpoveď

Aby ste mohli pridať odpoveď, prihláste sa.