Manga Loader NSFW (unmaintained)

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

< Feedback on Manga Loader NSFW (unmaintained)

Question/comment

§
Posted: 2019-02-25

high cpu usage

In recent update I noticed high cpu usage(100%) when there is image that fail to load It seems the image.onerror in addImage() will run constantly (Console shows thousands of "failed to load" message) current jankey solution: add the following script at the end of user script (after MLoaderLoadImps(nsfwimp);):

var IMAGES = { refresh_large: '' };

var addImage = function(src, loc, imgNum, callback) { var image = new Image(), counter = getCounter(imgNum); image.onerror = function() { log('failed to load ' + src); image.onclick = function() { image.onload = callback; image.title = ''; image.style.cursor = ''; image.src = src; }; }; image.onload = callback; image.src = src; loc.appendChild(image); loc.appendChild(counter); };

§
Posted: 2019-03-05

i have the same problem and this "solution" help me a lot Thanks, i was using the devtool in chrome to stop the script when this happen but while that help with the cpu usage but the memory usage goes higther

Post reply

Sign in to post a reply.