mirror of
https://github.com/30hours/blah2.git
synced 2024-11-18 12:33:58 +00:00
22 lines
400 B
JavaScript
22 lines
400 B
JavaScript
var host = window.location.hostname;
|
|
|
|
$(document).on('keypress', function (e) {
|
|
if (e.which == 32) {
|
|
url = "/capture/toggle";
|
|
|
|
$.getJSON('http://' + host + ':3000/capture/toggle', function () { })
|
|
|
|
.done(function (data) {
|
|
console.log('API worked');
|
|
})
|
|
|
|
.fail(function () {
|
|
console.log('API Fail');
|
|
})
|
|
|
|
.always(function () {
|
|
|
|
});
|
|
|
|
}
|
|
});
|