Chromium Code Reviews| Index: remoting/webapp/remoting.js |
| diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js |
| index b536190526c9275f68a927341ec463e6ca1d3be3..9723c7af5d4fbd87e518848b83617f7b79646cfb 100644 |
| --- a/remoting/webapp/remoting.js |
| +++ b/remoting/webapp/remoting.js |
| @@ -73,6 +73,26 @@ remoting.init = function() { |
| var button = document.getElementById('share-button'); |
| button.disabled = true; |
| } |
| + |
| + remoting.logExtensionInfoAsync_(); |
|
Jamie
2012/03/01 22:35:41
I think this would be better at the start of the f
garykac
2012/03/02 00:40:53
Done.
|
| +}; |
| + |
| +/** |
| + * Log information about the current extension. |
| + * The extension manifest is loaded and parsed to extract this info. |
| + */ |
| +remoting.logExtensionInfoAsync_ = function() { |
| + /** @type {XMLHttpRequest} */ |
| + var xhr = new XMLHttpRequest(); |
| + xhr.open('GET', 'manifest.json'); |
| + xhr.onload = function(e) { |
| + var manifest = |
| + /** @type {{name: string, version: string, default_locale: string}} */ |
| + JSON.parse(xhr.responseText); |
| + console.log(manifest.name + ' version: ' + manifest.version + |
| + ' (' + manifest.default_locale + ')'); |
|
Jamie
2012/03/01 22:35:41
I don't think I'd bother with the default_locale.
garykac
2012/03/02 00:40:53
Done.
|
| + } |
| + xhr.send(null); |
| }; |
| /** |