Webcomic Reader

Can work on almost any webcomic/manga page, preloads 5 or more pages ahead (or behind), navigates via ajax for instant-page-change, lets you use the keyboard, remembers your progress, and it's relatively easy to add new sites

< Feedback on Webcomic Reader

Question/comment

§
Posted: 2015-07-10

Working on site mangatown

So Ive been trying to make the site www.Mangatown.com work with this script and while mostly pretending to know what I'm doing I've managed to make it serviceable but it wont transition between chapters. I believe that within a chapter the script works fine, but the site has a weird java function to transition between chapters by keeping track of what your current page number is in comparison to the total page number. I managed to dredge up this bit of code that I assume is the key to the issue, but I don't have a clue how to plug this into the script.

function change_page(p){var t=p.options[p.selectedIndex].value;document.location=t}
function change_chapter(c){var t=c.options[c.selectedIndex].value;document.location=t}
function previous_chapter(){if(current_page<=1&¤t_chapter_index===0){document.location=series_url+'/'}else{document.location=(document.getElementById('top_chapter_list').options[current_chapter_index- 1].value)+'/last.html'}
return false}
function next_chapter(){if(current_page>=total_pages&¤t_chapter_index+ 1==total_chapters){if(comingnext!=''){document.location=comingnext}else{document.location=series_url+'/'}}else{var url=document.getElementById('top_chapter_list').options[current_chapter_index+ 1].value;if(url&&url[url.length- 1]!='/')url+='/';document.location=url;}
return false}
function previous_page(){if(current_page<=1){previous_chapter()}else{document.location=series_url+'/'+ current_chapter+'/'+(current_page- 1)+'.html'}
return false}
function next_page(){if(current_page>=total_pages){next_chapter()}else{document.location=series_url+'/'+ current_chapter+'/'+(current_page+ 1)+'.html'}
return false}

If someone who actually understands what this means could help me out that would be awesome.

Post reply

Sign in to post a reply.