1
0
Fork 0

Minor fixes

This commit is contained in:
magnolia-fan 2011-09-15 23:32:23 +04:00
parent 16fffcd9d0
commit 1e7ebeb23f
2 changed files with 10 additions and 8 deletions

View File

@ -10,6 +10,7 @@ vk_music.search "Kasabian", "L.S.F. (Lost Souls Forever)", "2:17", (url) ->
audio.setAttribute "src", url audio.setAttribute "src", url
document.getElementsByTagName("body")[0].appendChild audio document.getElementsByTagName("body")[0].appendChild audio
audio.play() audio.play()
false
``` ```
### JavaScript example ### JavaScript example
@ -21,6 +22,7 @@ vk_music.search("Kasabian", "L.S.F. (Lost Souls Forever)", "2:17", function(url)
audio = document.createElement("audio"); audio = document.createElement("audio");
audio.setAttribute("src", url); audio.setAttribute("src", url);
document.getElementsByTagName("body")[0].appendChild(audio); document.getElementsByTagName("body")[0].appendChild(audio);
return audio.play(); audio.play();
return false;
}); });
``` ```