diff --git a/README.md b/README.md index 7bea477..4e1c924 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Either follow the original documentation by Google: https://developer.chrome.com or you can use the `build-and-package.sh` to pack the exension - First get the private key for Duke. Save it to some file i.e. `/Users/myname/key.pem` -- Bump version in manifest.json +- Bump version like in this commit https://github.com/giosg/duke/commit/0cc73a9f333a57b52ced95900a43c8cefb63af25 - Build `duke.zip` with `build-and-package.sh` - Example usage `./build-and-package.sh --key=/Users/myname/key.pem` - The script should output `duke.zip` and you can upload that to Chrome Webstore diff --git a/app/scripts/postmessagelistener.js b/app/scripts/postmessagelistener.js index f7ad05b..bb5c1a7 100644 --- a/app/scripts/postmessagelistener.js +++ b/app/scripts/postmessagelistener.js @@ -159,8 +159,13 @@ }; DukePostMessageClient.prototype.on_showClient = function(data) { - GiosgClient.createChatDialog(); - GiosgClient.showClient(); + if (GiosgClient.isOperatorOnline === true) { + GiosgClient.showClient(); + GiosgClient.createChatDialog(); + } else { + var room = giosg.rooms[0]; + GiosgClient.showClient(false, room); + } this.sendResponse(data.query, {}); };