Created
May 27, 2011 19:11
-
-
Save theabraham/995932 to your computer and use it in GitHub Desktop.
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
sync = function() { | |
GSplay = {}; | |
GSplay.init = function() { | |
$("#nav").append("<li id='test'>test</li>"); | |
$("#nav").append("<li id='next'>Next</li>"); | |
console.log("---- GSplay ---- :: Start Playing"); | |
var songs = ["26603895", "27912670", "27470334"]; | |
//GS.player.addSongsToQueueAt(songs, -1, true, ""); | |
$("#test").click(function() { | |
GS.player.addSongAndPlay("27912670"); | |
}); | |
$("#next").click(function() { | |
GS.player.nextSong(); | |
}); | |
var toAppend = '<li class="last"> ' + | |
' <div id="shareStuffs" class="btn btn_style1"> ' + | |
' <span class="label">Share Songs</span> ' + | |
' </div> ' + | |
' <div id="userShareOptions" class="dropdown right" style="display: none; background-color:#fff; color:#000; width:300px; padding:5px; margin-top:-4px; border-top:none; "> ' + | |
' My uuID: <div id="uuIDspot"></div><br /><br />' + | |
' Friend uuID: <br /> ' + | |
' <input type="text" name="firstname" /> ' + | |
' </div> ' + | |
'</li>'; | |
$("#userOptions").append(toAppend); | |
$("#uuIDspot").html(GS.service.uuID); | |
$("#shareStuffs").click(function() { | |
$("#userShareOptions").toggle(); | |
$("#shareStuffs").css({"background-color": "#fff"}); $("#shareStuffs span.label").css({"color": "#000"}); | |
}); | |
} | |
setTimeout("GSplay.init()", 3000); | |
} | |
var script = document.createElement('script'); | |
script.textContent = '(' + GSsync + ')(jQuery, window);'; | |
document.body.appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment