Skip to content

Instantly share code, notes, and snippets.

@diogobaeder
Created June 15, 2010 07:30
Show Gist options
  • Save diogobaeder/438802 to your computer and use it in GitHub Desktop.
Save diogobaeder/438802 to your computer and use it in GitHub Desktop.
/**
* Little trick to list the MP3 paths
* from the great Jim Beard's web pages
* (one of the best Jazz composers I've known).
* Enjoy.
*/
var pattern = /Beard\smp3s\/.+\.mp3/,
base = "http://www.jimbeard.com/",
paths = [];
$$('a').forEach(function(el, i){
if (!el.onclick) return;
var attr = el.getAttribute('onclick'),
result = pattern.exec(attr),
path;
if (result) {
path = base + result[0];
console.log(path);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment