This repository has been archived on 2019-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
mumbledj/index.html
2015-08-13 15:20:37 +01:00

49 lines
1.3 KiB
HTML

<!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 apiComplete(jqXHR, textStatus) {
alert(textStatus);
}
function txtBox(type) {
var txt = $("#textbox");
api(type, txt.attr("value"));
txt.attr("value", "");
}
</script>
</head>
<body onload="onLoad();" bgcolor="#FFFFFF">
<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>