38 lines
1.1 KiB
HTML
38 lines
1.1 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 api(type) {
|
|
return "http://{{.Site}}/" + type + "?token={{.Token}}";
|
|
}
|
|
|
|
function addURL() {
|
|
var url = $("#textbox");
|
|
$.ajax(api("add") + "&value=" + url.attr("value"));
|
|
url.attr("value", "");
|
|
}
|
|
|
|
function volume() {
|
|
var volume = $("#textbox");
|
|
$.ajax(api("volume") + "&value=" + volume.attr("value"));
|
|
volume.attr("value", "");
|
|
}
|
|
|
|
function skip(val) {
|
|
$.ajax(api("skip") + "&value=" + val);
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Add Song Form</h1>
|
|
<input id="textbox" type="text"/>
|
|
<input id="add" type="button" value="Add Song" onclick="addURL()"/>
|
|
<input id="volume" type="button" value="Set Volume" onclick="volume()"/>
|
|
<input id="skipSong" type="button" value="Skip Current Song" onclick="skip('false')"/>
|
|
<input id="skipPlaylist" type="button" value="Skip Current Playlist" onclick="skip('true')"/>
|
|
</body>
|
|
</html> |