Made by Mark Noonan ( @marktnoonan), based on David Walsh's blog post, and with apologies for only working in Google Chrome.