Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Voice input feature implemented

Users may now use voice input in Google Chrome to control certain
elements on the page.
  • Loading branch information...
commit 30a0d5589cb07f99653ce5a83143d0cb96e2bf4e 1 parent e34ee81
@ARMIGER1 authored
Showing with 24 additions and 0 deletions.
  1. +24 −0 yours.js
View
24 yours.js
@@ -462,3 +462,27 @@ $(document).ready(function () {
// More classes if needed
});
+
+function process_speech_test() {
+ var command = $('#spoken').val();
+ console.log(command);
+
+ switch (command) {
+ case 'show text':
+ $('#container article').show(1000);
+ break;
+ case 'hide text':
+ $('#container article').hide(1000);
+ break;
+ case 'scramble images':
+ case 'show images':
+ $('#buildTable').trigger('click');
+ break;
+ case 'reload page':
+ location.reload();
+ break;
+ default:
+ $('#spoken').val("I'm sorry, I don't understand your command.").width(300);
+ break;
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.