| Index: remoting/webapp/remoting.js
|
| diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
|
| index 0989777bce319f6b04724dc4fb5262f1e1a1b95b..68928fe3bf66274a03000af0945e4559ff766e30 100644
|
| --- a/remoting/webapp/remoting.js
|
| +++ b/remoting/webapp/remoting.js
|
| @@ -125,13 +125,27 @@ remoting.onEmail = function(email) {
|
| };
|
|
|
| /**
|
| + * Returns whether or not IT2Me is supported via the host NPAPI plugin.
|
| + *
|
| + * @return {boolean}
|
| + */
|
| +function isIT2MeSupported_() {
|
| + var container = document.getElementById('host-plugin-container');
|
| + /** @type {remoting.HostPlugin} */
|
| + var plugin = remoting.HostSession.createPlugin();
|
| + container.appendChild(plugin);
|
| + var result = plugin.hasOwnProperty('REQUESTED_ACCESS_CODE');
|
| + container.removeChild(plugin);
|
| + return result;
|
| +}
|
| +
|
| +/**
|
| * initHomeScreenUi is called if the app is not starting up in session mode,
|
| * and also if the user cancels pin entry or the connection in session mode.
|
| */
|
| remoting.initHomeScreenUi = function() {
|
| remoting.hostController = new remoting.HostController();
|
| - document.getElementById('share-button').disabled =
|
| - !remoting.hostController.isPluginSupported();
|
| + document.getElementById('share-button').disabled = !isIT2MeSupported_();
|
| remoting.setMode(remoting.AppMode.HOME);
|
| if (!remoting.oauth2.isAuthenticated()) {
|
| document.getElementById('auth-dialog').hidden = false;
|
|
|