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

Preload pages and turn pages with JS

- - - - -

  • Please log in to reply
5 replies to this topic

#1
ChaosinaCan

ChaosinaCan

    Potato Spud

  • Members
  • 15 posts
It would be awesome if Batoto preloaded images and swapped out pages with JavaScript a la foolslide. Actually, I should say it is awesome, because I wrote a user script that does this, and it vastly improves the speed of the reader. I've attached it here in case you want to check it out.

Attached File  batoto.js.txt   17.07KB   21 downloads

This script only works in Opera 11.5+, but I'm sure it can be modified to work in Firefox + GreaseMonkey without too much work. (The uploader won't let me upload .js files, so remove the .txt from the file name.)

#2
Grumpy

Grumpy

    RawR

  • Administrators
  • 4,078 posts
  • LocationHere of course!
Batoto actually preloads images already. However, the method of display over javascript swapping is intentional.

#3
ChaosinaCan

ChaosinaCan

    Potato Spud

  • Members
  • 15 posts
Okay. Now, I'm interested in what benefit not switching pages via JavaScript has, since it's certainly more convenient for the reader (the person reading, not the website) when page turns are instant. All the recent browsers except IE9 support the history API, and other browsers support changing the URL hash, so linking to specific pages shouldn't be a problem. Is the reason related to bandwidth and/or ads?

#4
Grumpy

Grumpy

    RawR

  • Administrators
  • 4,078 posts
  • LocationHere of course!

Is the reason related to bandwidth and/or ads?

Yes.

#5
cmertb

cmertb

    Potato

  • Contributor
  • 161 posts
Hmm, can you make the same script reload the ad when a page is turned?

はりねずみは誇り高き鳥である。蹴らぬかぎり飛ばぬ。
 
My JPOP music subs (we consider requests too)


#6
Grumpy

Grumpy

    RawR

  • Administrators
  • 4,078 posts
  • LocationHere of course!

Hmm, can you make the same script reload the ad when a page is turned?

Can I make an ad reload via javascript? Probably yes. However, the ad networks scripts are NOT designed to do that. So unexpected behavior will likely follow. It also breaks terms of agreement for some of them.