mirror of
https://github.com/fergalmoran/dss.radio.git
synced 2025-12-22 09:48:21 +00:00
Fix up
This commit is contained in:
19
static/js/app.js
Normal file
19
static/js/app.js
Normal file
@@ -0,0 +1,19 @@
|
||||
function getCookie(name) {
|
||||
var r = document.cookie.match("\\b" + name + "=([^;]*)\\b");
|
||||
return r ? r[1] : undefined;
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var xsrf = getCookie("_xsrf");
|
||||
$('#play_audio').click(function () {
|
||||
$.post("/a/play", {
|
||||
_xsrf: xsrf,
|
||||
audio_file: $('#audio_file').val()
|
||||
});
|
||||
});
|
||||
$('#stop_audio').click(function () {
|
||||
$.post("/a/stop", {
|
||||
_xsrf: xsrf
|
||||
});
|
||||
});
|
||||
});
|
||||
4
static/js/jquery.js
vendored
Normal file
4
static/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user