Skip to content

Instantly share code, notes, and snippets.

@cincodenada
Created September 11, 2012 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cincodenada/3701961 to your computer and use it in GitHub Desktop.
Save cincodenada/3701961 to your computer and use it in GitHub Desktop.
var fileref=document.createElement('script'); fileref.setAttribute("type","text/javascript");fileref.setAttribute("src", 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js'); document.getElementsByTagName("head")[0].appendChild(fileref);
$('div[href^="/files"]').each(function(idx, el) { href = $(el).attr('href'); $(el).replaceWith('<a href="' + href + '">Download</a>') });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment