Created
November 2, 2012 21:13
-
-
Save makevoid/4004371 to your computer and use it in GitHub Desktop.
Loop play Soundcloud
This file contains hidden or 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
| // 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