In my last post, I announced that I was working on a bookmarklet for accessing localStorage. Undoubtedly, I didn’t expect it to take me another four days to get the time to be able to put it together, but at long last Saturday arrived and I had the time and energy to put into making this a reality.

So, for the purposes of brevity, this post is simply going to be the bookmarklet itself, and some brief explanation of how to use it. I will also type up a ‘why the heck did I build it that way’ post and get into the guts of the raw(un-minified) code.

I have (perhaps presumptuously) named this the jqLSAdmin. The ‘jq’ is because I use jQuery in it. The ‘LS’ denotes localStorage, and the ‘Admin’ part is because you can ‘administer’ your localStorage through the interface.

Bookmarklet: » jqLSAdmin «

Drag the bookmarklet up to your favorites bar in your browser of choice. When you are on a page where you would like to interact with the localStorage on that page, just click it. You will get a lightbox overlay on the page with the key/value pairs of your localStorage displayed. At the bottom of the list will be text boxes where  you can add new values to localStorage.

For those of you who may be concerned, I dynamically load in jQuery if it’s not already on the page, and if I did load it in I remove it when the bookmarklet is closed. I haven’t really worked the kinks out of noConflict() yet, so that isn’t handled in this release of this tool. However, as I experiment a bit further (or if someone wants to tackle it once I get the unminified code posted up), then please feel free.

Enjoy. Feedback is always appreciated.