From f25d11921b3bb32655dd60c296441081c0bfd8ca Mon Sep 17 00:00:00 2001 From: 0xPr0xy <0xPr0xy@gmail.com> Date: Tue, 13 Aug 2013 18:35:42 +0200 Subject: [PATCH 01/10] refactor code --- css/style.css | 78 +++++++++ {webspeechdemo => img}/mic-animate.gif | Bin {webspeechdemo => img}/mic-slash.gif | Bin {webspeechdemo => img}/mic.gif | Bin .../webspeechdemo.html => js/script.js | 150 +----------------- webspeechdemo.html | 63 ++++++++ 6 files changed, 148 insertions(+), 143 deletions(-) create mode 100644 css/style.css rename {webspeechdemo => img}/mic-animate.gif (100%) rename {webspeechdemo => img}/mic-slash.gif (100%) rename {webspeechdemo => img}/mic.gif (100%) rename webspeechdemo/webspeechdemo.html => js/script.js (65%) create mode 100644 webspeechdemo.html diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..1bd8b2a --- /dev/null +++ b/css/style.css @@ -0,0 +1,78 @@ + + * { + font-family: Verdana, Arial, sans-serif; + } + a:link { + color:#000; + text-decoration: none; + } + a:visited { + color:#000; + } + a:hover { + color:#33F; + } + .button { + background: -webkit-linear-gradient(top,#008dfd 0,#0370ea 100%); + border: 1px solid #076bd2; + border-radius: 3px; + color: #fff; + display: none; + font-size: 13px; + font-weight: bold; + line-height: 1.3; + padding: 8px 25px; + text-align: center; + text-shadow: 1px 1px 1px #076bd2; + letter-spacing: normal; + } + .center { + padding: 10px; + text-align: center; + } + .final { + color: black; + padding-right: 3px; + } + .interim { + color: gray; + } + .info { + font-size: 14px; + text-align: center; + color: #777; + display: none; + } + .right { + float: right; + } + .sidebyside { + display: inline-block; + width: 45%; + min-height: 40px; + text-align: left; + vertical-align: top; + } + #headline { + font-size: 40px; + font-weight: 300; + } + #info { + font-size: 20px; + text-align: center; + color: #777; + visibility: hidden; + } + #results { + font-size: 14px; + font-weight: bold; + border: 1px solid #ddd; + padding: 15px; + text-align: left; + min-height: 150px; + } + #start_button { + border: 0; + background-color:transparent; + padding: 0; + } \ No newline at end of file diff --git a/webspeechdemo/mic-animate.gif b/img/mic-animate.gif similarity index 100% rename from webspeechdemo/mic-animate.gif rename to img/mic-animate.gif diff --git a/webspeechdemo/mic-slash.gif b/img/mic-slash.gif similarity index 100% rename from webspeechdemo/mic-slash.gif rename to img/mic-slash.gif diff --git a/webspeechdemo/mic.gif b/img/mic.gif similarity index 100% rename from webspeechdemo/mic.gif rename to img/mic.gif diff --git a/webspeechdemo/webspeechdemo.html b/js/script.js similarity index 65% rename from webspeechdemo/webspeechdemo.html rename to js/script.js index b4bc72e..0cbde38 100644 --- a/webspeechdemo/webspeechdemo.html +++ b/js/script.js @@ -1,139 +1,4 @@ - - -
Click on the microphone icon and begin speaking.
-Speak now.
-No speech was detected. You may need to adjust your - - microphone settings.
- -Click the "Allow" button above to enable your microphone.
-Permission to use microphone was denied.
-Permission to use microphone is blocked. To change, - go to chrome://settings/contentExceptions#media-stream
-Web Speech API is not supported by this browser. - Upgrade to Chrome - version 25 or later.
--
-
Click on the microphone icon and begin speaking.
+Speak now.
+No speech was detected. You may need to adjust your + + microphone settings.
+ +Click the "Allow" button above to enable your microphone.
+Permission to use microphone was denied.
+Permission to use microphone is blocked. To change, + go to chrome://settings/contentExceptions#media-stream
+Web Speech API is not supported by this browser. + Upgrade to Chrome + version 25 or later.
++
+