Created
October 24, 2013 19:51
-
-
Save natlownes/7143837 to your computer and use it in GitHub Desktop.
http://www.wolo-mfg.com/elec.htm maybe remove headphones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.wolo-mfg.com/elec.htm