Skip to content
Browse files

wip: speech

  • Loading branch information...
1 parent a163f15 commit ce096a74243255621bf2b8764fae4e5c2ec46931 Visnu Pitiyanuvath committed Mar 27, 2011
Showing with 11 additions and 14 deletions.
  1. +3 −3 package.json
  2. +2 −2 public/javascripts/application.js
  3. +4 −6 public/stylesheets/application.styl
  4. +2 −3 views/layout.jade
View
6 package.json
@@ -16,11 +16,11 @@
"node": "*"
},
"dependencies": {
- "express": ">=2.0.0rc",
- "jade": ">=0.9.1",
+ "express": ">=2.1.0",
+ "jade": ">=0.10.0",
"markdown": ">=0.2.1",
"socket.io": ">=0.6.16",
- "stylus": ">=0.8.0"
+ "stylus": ">=0.9.2"
},
"devDependencies": {
"nodemon": ">=0.2.1"
View
4 public/javascripts/application.js
@@ -287,10 +287,10 @@ $(function() {
});
// keyboard
- var speakTimeout, $text = $('<textarea>')
+ var speakTimeout, $text = $('<input type="text" x-webkit-speech>')
.appendTo($('<div class="textarea-container">')
.appendTo(me.div))
- .bind('keyup', function(e) {
+ .bind('keyup webkitspeechchange', function(e) {
var text = $text.val();
switch (e.keyCode) {
case 13:
View
10 public/stylesheets/application.styl
@@ -67,12 +67,10 @@ footer
.textarea-container
overflow hidden
position relative
- height 1px
- width 1px
- textarea
- position absolute
- left -100px
- width 80px
+ height 50px
+ width 20px
+ input
+ width 10px
.page
position absolute
View
5 views/layout.jade
@@ -6,9 +6,8 @@ html
meta( name: 'viewport', content: 'width=800,initial-scale=1' )
title node.js knockout
link( rel: 'stylesheet', href: '/stylesheets/application.css' )
- :text
- <script>_gaq = [['_setAccount', 'UA-16773586-1'], ['_trackPageview']];</script>
- <script async src="//www.google-analytics.com/ga.js"></script>
+ script _gaq = [['_setAccount', 'UA-16773586-1'], ['_trackPageview']];
+ script( async: true, src: "//www.google-analytics.com/ga.js" )
body
!= body
- if (this.development)

0 comments on commit ce096a7

Please sign in to comment.
Something went wrong with that request. Please try again.