Skip to content

Instantly share code, notes, and snippets.

@makevoid
Created November 2, 2012 21:13
Show Gist options
  • Select an option

  • Save makevoid/4004371 to your computer and use it in GitHub Desktop.

Select an option

Save makevoid/4004371 to your computer and use it in GitHub Desktop.
Loop play Soundcloud
// It works on a single song page like: http://soundcloud.com/halfwsr/ultra-sta-bad-insect-willow-st
function play() {
setTimeout(function(){
$(".haudio.large .play").click()
},100)
}
function stopped() {
return $(".haudio.large .playhead").width() == 0
}
function cycle() {
setTimeout(function(){
if (stopped())
play()
cycle()
},1000)
}
play()
cycle()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment