Solving a problem with a Greasemonkey script
I quickly grew tired of clicking the small next button on the xkcd site, whilst trying to view every comic from the start, in order. I thought "hey, why don't I check out that Greasemonkey thing! This sounds like a perfect excuse."
I knocked up a small Greasemonkey script that turns the comic into the next link, so you can just click the comic to view the next, just like FaceBook and Lightbox variants.
At first, I was tempted to add jQuery and put it together that way. After all, I use jQuery for 99% of DOM manipulation, as it is just that damn easy. But for this, I decided to use the standard DOM API, as I am only coding for Firefox (had I need to support IE, it may have been a different story).
Another thing that was a bit janky is how prone the script is to breaking; but that will mostly be the case when coding something up for a third party site that doesn't provide an API. Since I started reading xkcd in 2007, I can't recall any major site updates. Please drop me a line if it is ever breaks!
So download it, and start viewing xkcd from the begininng! Some of the earlier ones are quite different to his recent work, so grab a beer and put your feet up!
Comments
No comments yet.
Leave a Comment
Note: Your comment may require approval before it is posted to the site.