Wednesday, April 15, 2009


You might notice the new reading progress bar I added on the right side, this is to aid my effort to read more. I'm currently 177ish pages through the 981 page long Shadows Rising, the 4th book in the Wheel of Time series. It's funny, but four books into a series is more than I've ever read, and I have no doubts that WoT will be one of the few long series of books that I ever read. The only other one I've read more than 3 books of is Dune, which I liked all 4 of the books that I read in that series too. Right now the progress bar is a % out of 100, but if I can figure out how to make it pages/total pages I will change it to that because then I don't have to do any math to get the %!

Is that a new level of lazy?


Jared said...

First of all, amazing you chose that monster of a series, I hope to hold out until it gets finished in some way.

Secondly. Is the progress bar open source? If so send me teh code. Sounds like a fun task.

Bartoneus said...

I grabbed the progress bar code from this one designed for knitting projects:

Jared said...

I haven't forgotten.
In fact the quickest answer to your problem is to just switch out the integer in your percent field with this:


where you've read 177 out of 981 pages.

the line within the script tags will end up looking like this:

drawProgressBar('#ff0000', 200, Math.round(177/981*100));

But that solution isn't very pretty and I'm just having too much fun thinking about how to best publish the nice, new clean function I made for it

drawBookProgress(color, width, finishedPages, totalPages)