diff options
Diffstat (limited to 'remoting/webapp/remoting.js')
-rw-r--r-- | remoting/webapp/remoting.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js index e1d1433..75b84b7 100644 --- a/remoting/webapp/remoting.js +++ b/remoting/webapp/remoting.js @@ -30,6 +30,7 @@ remoting.Error = { * Entry point for app initialization. */ remoting.init = function() { + remoting.logExtensionInfoAsync_(); l10n.localize(); var button = document.getElementById('toggle-scaling'); button.title = chrome.i18n.getMessage(/*i18n-content*/'TOOLTIP_SCALING'); @@ -77,6 +78,23 @@ remoting.init = function() { }; /** + * 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); + } + xhr.send(null); +}; + +/** * If the client is connected, or the host is shared, prompt before closing. * * @return {?string} The prompt string if a connection is active. |