Javascript bookmarks to access Alexa, Compete, and Quantcast

First, the bookmarks. These little pieces of JavaScript will automatically take you to the Alexa, Compete, and Quantcast stats of whatever page you’re currently viewing. Just create new bookmarks in your Bookmarks Bar or wherever, and change the location to the JavaScript.

Alexa:
javascript:(function(){location.href='http://alexa.com/siteinfo/' +window.location.hostname})();

Compete:
javascript:(function(){var%20loc;loc=window.location.hostname; loc=loc.replace(/www./,'');location.href= 'http://siteanalytics.compete.com/'+loc})();

Quantcast:
javascript:(function(){location.href='http://quantcast.com/' +window.location.hostname})();

A bit of background: I switched from Windows to Mac a couple of years ago, and have been using Firefox ever since. Lately, though, Firefox has been thrashing my hard drive, making the whole thing painfully slow.

I’ve switched to Safari, and man is it fast. I installed Glims, which does most of the stuff I missed with Firefox, like undoing the last closed tab, and re-opening tabs from the last session when Safari first starts.

I did miss having an Alexa toolbar — I know Alexa isn’t all that accurate, but at least it gave me some idea — so I wrote these JavaScript bookmarks. Not quite as convenient, but it’s the next best thing.

Now I just need replacements for the Google Bookmarks and Web Developer extensions and I’ll be set.