Jump to content

Primary: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Secondary: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Squares Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Photo

Reader bug: can't go back to previous chapter with the arrows


  • Please log in to reply
4 replies to this topic

#1
Mad Hero

Mad Hero

    Potato

  • Contributor
  • 105 posts

When you read a comic and go to the next chapter you can't navigate with the arrows to the previous one you read.

 

If you are in the first page of the new chapter, the values are:

next_page = 'http://bato.to/reader#someIdA_2';
prev_page = 'http://bato.to/reader#someIdB_last';

If you try to go back from there with those values then the function calls are:

// Apparently IPB adds the method last to the Array prototype
checkMemory('someIdB', 'last', '');
>> function last(){return this[this.length-1];}

// when you try to change the html with jQuery the reader actually does:
jQuery( "#reader" ).html( function last(){return this[this.length-1]} );

This doesn't happen if it's the first chapter opened because then the function checkMemory returns false when it checks that the array for the previous chapter ( page_memory['someIdB'] ) hasn't been created, thus without having to check if there exists 'last' in page_memory['someIdB']


Edited by Mad Hero, 22 April 2017 - 11:34 PM.


#2
Daktyl

Daktyl

    Discord King

  • Contrib Mods
  • 825 posts
  • LocationMI, USA

Specifically, navigating back to the last page of the previous chapter does not work. Navigating to the previous chapter using the chapter arrows (the double arrows) works just fine.


My words are my own, and do not represent Batoto in any way, shape, or form unless otherwise stated in the post itself ^.^


#3
svines85

svines85

    Sweet Potato

  • Contributor
  • 14,063 posts
  • Locationunderground like a wild potato

If memory serves, it seems like this cropped up right after the site began using cloudflare and has been like that ever since.


Tn7HA0h.png


#4
Daktyl

Daktyl

    Discord King

  • Contrib Mods
  • 825 posts
  • LocationMI, USA

If memory serves, it seems like this cropped up right after the site began using cloudflare and has been like that ever since.

No, this would be a bug related to the introduction of the AJAX reader, which happened a while before the cloudflare stuff.

 

Most likely this passed beta testing because most people use the back button on their browser to get to the page they were just at (which works just fine). This is just talking about the green arrows on the side of the reader.


My words are my own, and do not represent Batoto in any way, shape, or form unless otherwise stated in the post itself ^.^


#5
svines85

svines85

    Sweet Potato

  • Contributor
  • 14,063 posts
  • Locationunderground like a wild potato

No, this would be a bug related to the introduction of the AJAX reader, which happened a while before the cloudflare stuff.

 

Most likely this passed beta testing because most people use the back button on their browser to get to the page they were just at (which works just fine). This is just talking about the green arrows on the side of the reader.

 

Ah, it was something else, I just somehow got it associated with the cloudflare thingy.......probably just was closer to its introduction when I finally noticed the reader being buggy :D

 

It is buggy though, has been for a while and it's more than just this one thing. Oh well :)


Tn7HA0h.png