tadhg.com
tadhg.com
 

Power to the Users

23:50 Thu 23 Nov 2006. Updated: 22:03 25 Nov 2006
[, , , , , , , ]

I spent some time today creating a bookmarklet (copy the contents of this page into Firefox or another Gecko-based browser) and greasemonkey script for enhancing the magictraders.com pricelists. This kind of thing exemplifies what I love about HTML, and why I distrust less open technologies.

HTML lets you see what it is. It comes from the server to the browser as text, and the browser interprets the HTML to present the information included. Translating raw text can be awkward, but also presents a well-understood set of problems. With the advent of a rational Document Object Model, it has become possible to do even better than raw text processing. With a good browser, you can manipulate the information coming to you as you see fit.

Which fits in with my ideas for how information sharing should work. And allows the informed user to alter things as they see fit without having access to the source materials.

While on the niche-geek side in terms of content, the script I wrote today represents these principles rather well. The website www.magictraders.com collates price information about MTG card sales from a variety of sources, primarily eBay. If eBay did not use HTML, the magictraders.com crew would have a far tougher time collecting the data. The magictraders.com pages output dumps of this data, essentially in plain text encapsulated by a basic HTML wrapper. If they used some other format, I would have had a much tougher time (probably too tough a time to bother).

They provide useful data, but I wanted to be able to sort their pricelists. I didn’t want to suck down all their data and combine it with other sources to create a comprehensive card info/card price database (like some people), but rather wanted immediate and simple sorting ability right in my browser. I use my browser all the time, and consider it an extremely important environment—not just a mere application. And Firefox gives me a programming environment (by necessity, since it has to support JavaScript) capable of performing complex manipulations on data. Combining it with greasemonkey makes it simple to automate those manipulations. I started out going to their site and seeing pricelist pages that were static text, and wishing that I could sort them by price. After a few hours of tinkering, I now go to their site and instead see a formatted HTML table that can be sorted by any of the fields—and achieved this without any input or access to their code or servers, or even my own servers. Just the browser. Just the browser to go from this:
Magictraders.com pricelist before
to this:
Magictraders.com pricelist after

This simply seems the right approach, allowing for user manipulation and distributed improvement, as well as the possibility of plenty of tinkering. It also exposes the true richness of HTML, as opposed to the apparent ‘richness’ (really meaning showiness, most of the time) of things like Flash and various “multimedia” efforts to replace boring old hypertext markup. Control to the users if they want it—as both user and developer, I want things to go in that direction.

Greasemonkey script

Sadly, due to link-length limitations, to get the bookmarklet to work you’ll have to follow this link and paste the contents into your browser’s bookmarks manager. It won’t work in IE. Invoke it on the pricelist page to get it to work.

« (previous)

Leave a Reply