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

38 lines
1.1 KiB
HTML
Raw Normal View History

2015-07-29 03:04:32 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
2015-07-30 18:43:08 +02:00
<title>{{.User}} - mumbledj</title>
2015-07-30 14:48:53 +02:00
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
2015-07-29 03:04:32 +02:00
<script type="text/javascript">
2015-07-30 14:48:53 +02:00
function api(type) {
2015-07-30 18:50:49 +02:00
return "http://{{.Site}}/" + type + "?token={{.Token}}";
2015-07-30 14:48:53 +02:00
}
function addURL() {
var url = $("#textbox");
2015-07-30 18:54:44 +02:00
$.ajax(api("add") + "&value=" + url.attr("value"));
2015-07-30 19:10:06 +02:00
url.attr("value", "");
2015-07-30 14:48:53 +02:00
}
function volume() {
var volume = $("#textbox");
2015-07-30 18:54:44 +02:00
$.ajax(api("volume") + "&value=" + volume.attr("value"));
2015-07-30 19:10:06 +02:00
volume.attr("value", "");
2015-07-30 14:48:53 +02:00
}
2015-07-29 03:04:32 +02:00
2015-07-30 14:48:53 +02:00
function skip(val) {
$.ajax(api("skip") + "&value=" + val);
2015-07-29 03:04:32 +02:00
}
</script>
</head>
<body>
<h1>Add Song Form</h1>
2015-07-30 14:48:53 +02:00
<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()"/>
2015-07-30 19:25:13 +02:00
<input id="skipSong" type="button" value="Skip Current Song" onclick="skip('false')"/>
<input id="skipPlaylist" type="button" value="Skip Current Playlist" onclick="skip('true')"/>
2015-07-29 03:04:32 +02:00
</body>
</html>