<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>{{.User}} - mumbledj</title>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
function onLoad() {
window.setInterval(function() {
// Get the song queue
}, 6000);
}
function setAPI(type, val) {
$.ajax({
url : "http://{{.Site}}/api/" + type + "?token={{.Token}}"
+ "&value=" + val,
complete : apiComplete,
cache : false
});
function apiCompete(jqXHR, textStatus) {
alert(textStatus);
function txtBox(type) {
var txt = $("#textbox");
api(type, txt.attr("value"));
txt.attr("value", "");
</script>
</head>
<body onload="onLoad();">
<h1>Add Song Form</h1>
<input id="textbox" type="text" />
<input id="add" type="button" value="Add Song"
onclick="setAPI('add', $('#textbox').attr('value'))" />
<input id="volume" type="button" value="Set Volume"
onclick="setAPI('volume', $('#textbox').attr('value'))" />
<input id="skipSong" type="button" value="Skip Current Song"
onclick="setAPI('skip', false)" />
<input id="skipPlaylist" type="button" value="Skip Current Playlist"
onclick="setAPI('skip', true)" />
<br />
<textarea id="status" rows="10" cols="30"></textarea>
</body>
</html>