Arquivos
2013-10-04 19:53:58 +01:00

24 linhas
427 B
JavaScript

// Let's define a command.
var commands = {
'take off': function() {
$.ajax('/takeoff');
$("#takeoff").show();
$("#land").hide();
},
'hello test': function(){
console.log("TEST!!");
$("#test").show();
},
'drone land': function(){
$.ajax('/land');
$("#takeoff").hide();
$("#land").show();
}
};
// Initialize annyang with our commands
annyang.init(commands);
// Start listening
annyang.start();