Library catalog, data: URIs, & bookmarklets

My public library, and, I expect, so does your's, uses Innovative Interfaces catalog tools. This web application is the poster child for poor user interface and user experience. It is not my objective to enumerate the problems. Instead, I discovered a useful mechanism of getting around the problem I have with remembering my library card's barcode. (Why on earth do the designers of this software expect me to remember my barcode is unfathomable.)

My original solution was to embed the barcode in a URL that mimicked the web application's form-based login. This URL was then bookmarked to allow for immediate access. This worked for a good number of years until the catalog software was updated. At which point the URL broke and I was unable to reproduce this solution using the updated software. (The obstacle seemed to be the need for a session identification that I could not contrive.) And so I needed a different approach.

The approach I took was to be able to show the barcode when I used the catalog. Having an absolute DIV positioned at the bottom the browser's window is easy to do with CSS. The problem was that to do this I needed to dynamically alter the catalog's HTML. I really did not want to install GreaseMonkey to accomplish this. The next best solution was to have a standalone page with an embedded IFRAME. This give me full control over what was on the page. The HTML is

<html>
<head>
<title>South Kingstown Library Catalog</title>
<style>
* {
margin: 0;
padding: 0;
border: 0;
}
#tab {
font-family: Verdana;
position: fixed;
bottom: 0px;
right: 4ex;
padding: 2ex;
border-top-left-radius: 1ex;
border-top-right-radius: 1ex;
color: white;
background: gray;
}
</style>
</head>
<body>
<div id="tab">
barcode: 123456789
</div>
<iframe
src="https://catalog.oslri.net/search/"
width="100%"
height="100%"
scroll="auto"
marginheight="0"
marginwidth="0"></iframe>
</body>
</html>

I didn't like having to store this page as a file on my local machine and storing it on a HTTP server seemed overkill. Clearly, I was over thinking, but this is what I do for my day job. It then occurred to me that I could encode the page as a data URI and, I hoped, that when I used this URI the browser would render the encoded page. I used David Wilkinson's data: URI creation tool to create the URI. And, to my wonderment, Safari, FireFox, and Chrome (all on OS X) did exactly as hoped for.

What this means is that my future bookmarklets can more sophisticated then I ever considered practical before. Perhaps you can use this discovery too.