Skip to content

Instantly share code, notes, and snippets.

@natlownes
Created October 24, 2013 19:51
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 natlownes/7143837 to your computer and use it in GitHub Desktop.
Save natlownes/7143837 to your computer and use it in GitHub Desktop.
http://www.wolo-mfg.com/elec.htm maybe remove headphones
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.onload = function() {
var hrefs = jQuery('a[href*=".wav"]');
for(var i=0;i<hrefs.length;i++) {
var uri = (hrefs[i].href);
var audio = jQuery('<audio autoplay loop src="' + uri + '">')
jQuery('body').append(audio);
};
}
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
head.appendChild(script);
@natlownes
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment