Skip to content

Instantly share code, notes, and snippets.

@quarnster
Created June 1, 2013 18:44
Show Gist options
  • Save quarnster/5691334 to your computer and use it in GitHub Desktop.
Save quarnster/5691334 to your computer and use it in GitHub Desktop.
Small javascript for fetching all files in a document.
var re = new RegExp("download|subtitle.*srt|class_resources|slides")
for (var i in document.links)
{
var link = document.links[i].href;
if (re.test(link)) {
window.open(link);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment