Recently in troubleshooting bad links and dangerous querystring params on the site I work on for my day job, I’ve repeatedly had to unescape url encoded strings. I can never remember what the codes mean, so I inevitably google for url escaping and trying to piece together what I’m looking at.
If you look at the edit history of the gist you can see what I was doing was essentially alerting the unescaped version of the anonymous function I had created. Firefox and the other browsers decided that I really meant to use the results of the function and not the function itself and helpfully evaled the function and used the returned value. IE took me at my word and altered the function object assigned to the sel variable. Once I corrected the code to make sure that the was calling the funciton and using its returned value, all the hackery I had to do to get IE to work went away.
Updated bookmarklet code above.
Oh, and it also occurs to me that this wasn’t my first bookmarklet – I created a day of the year bookmarklet a while back that I’ll post here sometime.