Permalink
Browse files

further tweaks

  • Loading branch information...
1 parent ca705c5 commit 3c0c99ddcda7434cc438ce5c93ef3cb746aa1d46 Addy Osmani committed Jun 13, 2011
Showing with 2 additions and 4 deletions.
  1. +1 −1 index.html
  2. +1 −3 js/mylibs/speechBrowser.js
View
@@ -31,7 +31,7 @@
<form action="/" id="q">
<input name="speechQuery" id="speechQuery" type="text" x-webkit-speech speech error onwebkitspeechchange="speechBrowser.query(true);" />
<input type="submit" name="submitQuery" id="submitQuery" value="Submit" />
- <h3>Supports: hello, how is the weather? (variations), what is your name?, search [something something], whats your favorite movie?, define [something]</h3>
+ <h3>Supports: hello, how is the weather? (variations), what is your name?, search [something something], whats your favorite movie?, define [something], french [something], german [something]</h3>
</form>
<div class="search-case">
<div id="search-results"></div>
@@ -87,7 +87,6 @@ var speechBrowser = function(){
this.getDictionaryDefinition(src);
break;
}
-
},
getQueryStartsWith: function(needle, haystack){
@@ -113,7 +112,7 @@ var speechBrowser = function(){
query: function(val){
//set qStr = val if you want to test without speaking.
- var qStr = speech.val();
+ var qStr = speech.val() || val;
var stage = $('#search-results');
this.prepareStage();
@@ -126,7 +125,6 @@ var speechBrowser = function(){
frenchTest = $.trim(this.getQueryStartsWith('french', qStr)),
germanTest = $.trim(this.getQueryStartsWith('german', qStr));
- console.log('def test:' + defineTest);
if(searchTest.length > 0){
this.textToSpeech('i hope these results for' + searchTest + ' help ');

0 comments on commit 3c0c99d

Please sign in to comment.