Friday, November 23, 2007

Wikipedia Gears Cache Script

The concept:Combine Google Gears, Greasemonkey, and Wikipedia to make something very cool. It adds a box to the side of every Wikipedia page with a link to cache it, so you can then revisit it when you're not connected to the internet.

Google Gears:Google Gears is a toolbox Google made to let you access websites offline. The first use I know of was the Google RSS reader, where you download all the news, then read it offline and sync back up the next time you're connected.

Greasemonkey:This is a firefox plugin which lets you install scripts to change how web pages look. You can install one script that censors words, or changes the color of some outline of a website, or inserts extra useful links into websites (which is what this script does)

So all of this together comes together into the dream of every wikipedia junky like myself. Unfortunately there is one problem with the script. It lists every page you have cached, which is no good. I want to be caching like a fiend, without putting a huge ugly box on the side of every en.wikipedia.com page I visit. Thus, I edited it.

I think it's very impressive work, since I've never done anything with javascript before, and I did all of this sitting in a motel room near Fresno with no internet or reference material. There is still one problem:

The [ Cache Page ] and [ Show Cache ] links render next to each other. This problem isn't there when it's [ Page Cached ] and [ Show Cache ]