Guest User

SuperSimpleServer - Play MP3s

a guest
Jul 5th, 2019
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:(function()%7Bvar%20currentTrack%20%3D%200%3Bfunction%20playNextTrack()%20%7BcurrentTrack%20%2B%3D%201%3Bif%20(currentTrack%20%2B%201%20%3C%3D%20mp3_links.length)%20%7Baudio_elem.src%20%3D%20mp3_links%5BcurrentTrack%5D%3Baudio_elem.load()%3Baudio_elem.play()%3B%7Delse%20%7BcurrentTrack%20-%3D%201%3B%7D%7Dmp3_links%20%3D%20%5B%5D%3Bdocument.querySelectorAll(%22a%5Bhref%24%3D'.mp3'%5D%22).forEach((elem%2C%20index)%20%3D%3E%20%7Bmp3_links.push(elem.getAttribute(%22href%22))%3B%7D)%3Bif%20(mp3_links.length%20%3E%200)%20%7Bvar%20audio_elem%20%3D%20document.createElement(%22audio%22)%3Baudio_elem.setAttribute(%22controls%22%2C%20%22controls%22)%3Baudio_elem.src%20%3D%20mp3_links%5BcurrentTrack%5D%3Bdocument.body.appendChild(audio_elem)%3Baudio_elem.addEventListener('ended'%2C%20playNextTrack)%3B%7D%7D)()
RAW Paste Data