Archive for July, 2007

GearSaver Bookmarklet

Sunday, July 29th, 2007

Google Gears is one of the most exciting technologies to be released IMO. It will push the web 2.0 envelope further and bring interactive web applications to the next level — offline! Well, not just offline, the whole point is that you can design your application synchronization strategy.

I’ve been experimenting with it a bit and it’s surprisingly (Javascript) developer friendly. The end product is a bookmarklet I call GearSaver. It’s really a shell that injects the gearsaver.js script hosted on my server into the current page that you’re viewing. It saves all your textareas (be it a blog post or wiki page that you’re editing, any multi-line text box in a form) into Gears.

This is pre-pre-pre alpha and is only a proof-of-concept, I haven’t tested it in IE and there isn’t a way to view the saved results yet. You can, however, use the DB query tool included in the gears samples and select the textarea table in the gearsaver database.

This is personally very useful to me because many a time I’ve lost valuable work in a textarea upon submitting a page and the network goes down. What this does is that it saves a version of each textarea found on the page, indexed by the URL and its xpath. It is also timestamped. My next enhancement would be to have a pull-down menu on each textarea to allow you to revert to older versions.

Without further ado:

Add the following bookmark and use it on any page: Launch GearSaver

Updated 20080812: bookmarklet to use version 0.4.