Index: chrome/common/extensions/docs/examples/api/speechInput/basic/background.js |
diff --git a/chrome/common/extensions/docs/examples/api/speechInput/basic/background.html b/chrome/common/extensions/docs/examples/api/speechInput/basic/background.js |
similarity index 76% |
copy from chrome/common/extensions/docs/examples/api/speechInput/basic/background.html |
copy to chrome/common/extensions/docs/examples/api/speechInput/basic/background.js |
index 34e71518abb49119b81f74b2d771f5d6214de6d0..3093b6cdaede853e7d7202cc767c3a2e914cc87c 100644 |
--- a/chrome/common/extensions/docs/examples/api/speechInput/basic/background.html |
+++ b/chrome/common/extensions/docs/examples/api/speechInput/basic/background.js |
@@ -1,5 +1,7 @@ |
-<html> |
-<script> |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
function setStartIcon() { |
chrome.browserAction.setIcon({ path: "start.png" }); |
} |
@@ -13,7 +15,8 @@ chrome.browserAction.onClicked.addListener(function(tab) { |
if (!recording) { |
chrome.experimental.speechInput.start({}, function() { |
if (chrome.extension.lastError) { |
- alert("Couldn't start speech input: " + chrome.extension.lastError.message); |
+ alert("Couldn't start speech input: " + |
+ chrome.extension.lastError.message); |
setStartIcon(); |
} else { |
setStopIcon(); |
@@ -36,5 +39,3 @@ chrome.experimental.speechInput.onResult.addListener(function(result) { |
alert(result.hypotheses[0].utterance); |
setStartIcon(); |
}); |
-</script> |
-</html> |