Unsuckifying All Music Guide links

Written by Adrian Holovaty on June 14, 2004

In my eternal quest to explore and collect obscure 1960s pop/rock, no site has helped me more than All Music Guide -- a tremendous database that seems to be an attempt to catalog all recorded music. It just might be my favorite non-Google-nor-Amazon Web site.

The annoying thing about it, though, is it uses JavaScript almost exclusively for its internal links. AMG links don't point to a distinct URL; rather, each link executes custom JavaScript code -- such as <a href="javascript:z('Awgde4j370wat')"> -- that does the actual page redirection. Not only does that make the site useless for people with JavaScript turned off, but it's also an annoyance for folks like me who like to browse by middle-clicking links to open them in background tabs.

Here, then, is a bookmarklet that converts each JavaScript URL on any All Music Guide page into a normal URL, suitable for middle-clicking:

Unsuckify All Music Guide links

I've tested it in Mozilla Firefox 0.8.

Comments

Posted by Wilson on June 14, 2004, at 5:28 a.m.:

It works (in Safari)! Too bad the links are still hideous, even underneath the javascript. Still, an indispensable site. AMG and IMDB are neck-and-neck for the ugliness-to-usefulness-ratio award.

Posted by Andrew Dupont on June 14, 2004, at 5:47 a.m.:

Beautiful! I never thought about this long enough to try to figure out a way around those idiotic links. I'll be using this on a daily basis.

Posted by Anonymous Coward on June 14, 2004, at 6:07 a.m.:

Bless you.

Posted by Levi on June 14, 2004, at 3:41 p.m.:

I've been using AMG links for my albums list on my site and it's been ridiculous having to click through each link for the URI rather than just copying it with a click. You are a godsend, Adrian. I take back all those bad things I ever said about you ;-)

Posted by Steven Jarvis on June 14, 2004, at 4:26 p.m.:

Yes! Thank you!

Posted by jacob on June 14, 2004, at 11:17 p.m.:

I bet that this would work quite well with the UserScript extension for Firefox. Install the extension, copy the bookmarklet code to UserScript.js (with some tweaks to ensure that it executes only while at AMG), and then you'd probably never have to worry about AMG's sucky links again.

Posted by Tony on July 13, 2004, at 4:58 p.m.:

Well check out the new "improved" AMG. No support for any other browser besides IE. Horrible looking web site now. The new site is a big dissapointment in my opinion.

Posted by Ian Scott on July 15, 2004, at 7:42 p.m.:

I also made an allmusic fixer. The fixer on this site and my old one won't work any more, because they're using onclicks instead of hrefs. I've made an updated one for the new "improved" site. Here it is. Feel free to share it.

Posted by Daniel on July 16, 2004, at 1:45 p.m.:

I've updated your bookmarklet to match the new AMG onClick links. Here it is:

javascript:(function(){ var as = document.getElementsByTagName('a'); for (var i = as.length - 1; i >= 0; i--) { var oc = as[i].getAttribute('onclick'); if (oc) { var ms = oc.match(/^z\('(.*?)'\)$/); if (ms) as[i].href = '/cg/amg.dll?p=amg&sql=' + ms[1]; }}})();

Comments have been turned off for this page.