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");
$.ajax(api("add") + "&value=" + url.value);
url.value = "";
}
function volume() {
var volume = $("#textbox");
$.ajax(api("volume") + "&value=" + volume.value);
volume.value = "";
}
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()"/>
<input id="skipSong" type="button" value="Skip Current Song" onclick="skip('song')"/>
<input id="skipPlaylist" type="button" value="Skip Current Playlist" onclick="skip('playlist')"/>
2015-07-29 03:04:32 +02:00
</body>
</html>