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

< Обсуждения Manga Loader (unmaintained)

Отзыв: Хороший — скрипт работает как нужно

Hello,

I've tried to integrate mangafreak in the extension, but no matter how hard I try – I've been at it for twelve hours – I don't manage to display more than one page. I think, my error is in the "next" variable part.

The pages are managed by javascript. When you click on the "next" button on the page or you use the right-arrow, the url doesn't change. I studied deeply their script, and what they do is quite simple really. They "display:none" all the pages except the one you are on. And when you change page, they "display:none" the page you were on and "display:block" the one you're going in.

But while I've managed to understand how their script work, I'm not good enough to understand yours. So I don't know what I'm doing wrong.

To explain quickly what I did, they have a "select" button to display the number of pages and allowing you to navigate them. The page you are on can easily be found via the variable "selectedIndex" of the options in the select.

From this option, I have the current page and so I only need to add +1 to display the next page.

That's what I tried to do via two different methods. Here, I wrote both in the code – so with two returns in the function in succession – but obviously when I actually launch and test the code, I only use one of them.

Please, help me understand how I can make it work because I'm stumped and going crazy.

}, {
name: 'mangafreak',
match: "^https?://w13.mangafreak.net/*",
img: '#gohere',
next: function() {
return '.mySlides:nth-child(' + document.getElementById('select').options.selectedIndex + 1 + ') > img';
return document.getElementsByClassName('mySlides')[document.getElementById('select').options.selectedIndex + 1].children[0];
},
numpages: '#select',
curpage: '#select',
nextchap: '.read_tools:nth-child(2) > span:last-child > a',
prevchap: '.read_tools:nth-child(2) > span:first-child > a'
}, {

Thank you in advance for your help and more importantly for having shared this awesome app with us.

Sincerely,

-aGnamZer0

PS: Could you maybe make your tutorial video on how to modify the code in YouTube public again?
PPS: I don't understand how the "pages" variable works. Maybe it could have been the solution to my problem.

I've rewritten my message with more details.

Hello,

I've tried to integrate mangafreak in the extension, but no matter how hard I try – I've been at it for twelve hours – I don't manage to display more than one page. I think, my error is in the "next" variable part.

The pages are managed by javascript. When you click on the "next" button on the page or you use the right-arrow, the url doesn't change. I studied deeply their script, and what they do is quite simple really. They "display:none" all the pages except the one you are on. And when you change page, they "display:none" the page you were on and "display:block" the one you're going in.

But while I've managed to understand how their script work, I'm not good enough to understand yours. So I don't know how to fix what I know I'm doing wrong.

To explain quickly what I did, they have a "select" button to display the number of pages and allowing you to navigate them. The page you are on can easily be found via the variable "selectedIndex" of the options in the select.

From this option, I have the current page and so I only need to add +1 to display the next page.

I think the problem is that the script expect the url from the next page, while all I can offer is the element "img" or the link of the image.

The button "next" is formated thus : Next

If I try to put the "javascript:void;", it doesn't work. And the important part, the function "plusDivs(1)" – with the "1" being the number of pages you go forward or backward (it could be "3" or "-3") – doesn't work in the script since it expects an url. Like I explained, the function works in collaboration with others functions to display:none or block the pages so that you get in the one you want.

That's what I tried to do via two different methods. Here, I wrote both in the code – so with two returns in the function in succession – but obviously when I actually launch and test the code, I only use one of them.

Please, help me understand how I can make it work because I'm stumped and going crazy.

}, {
name: 'mangafreak',
match: "^https?://w13.mangafreak.net/*",
img: '#gohere',

/////IMPORTANT PART!!!!/////
next: function() {
// Return of the element img
return '.mySlides:nth-child(' + document.getElementById('select').options.selectedIndex + 1 + ') > img';
return document.getElementsByClassName('mySlides')[document.getElementById('select').options.selectedIndex + 1].children[0];

//Return of the link of the image (not of the next page)
return document.getElementsByClassName('mySlides')[document.getElementById('select').options.selectedIndex + 1].children[0].src;
},
////////////////////////////

numpages: '#select',
curpage: '#select',
nextchap: '.read_tools:nth-child(2) > span:last-child > a',
prevchap: '.read_tools:nth-child(2) > span:first-child > a'
}, {

I expect I'd have the same troubles if I wanted to integrate a website where the presentation if on "long strip" format. I wouldn't be able to deliver urls of pages, only the elements "img" or the links of said images.

Thank you in advance for your help and more importantly for having shared this awesome app with us.

Sincerely,

-aGnamZer0

PS: Could you maybe make your tutorial video on how to modify the code in YouTube public again?
PPS: I don't understand how the "pages" variable works. Maybe it could have been the solution to my problem.

Ответить

Войдите, чтобы ответить.