Skip to content

Commit e3aaf81

Browse files
committed
minor
1 parent 82c9918 commit e3aaf81

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎v3/js/opt-frontend-common.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ var pyInputCodeMirror; // CodeMirror object that contains the input text
6969

7070
// BEGIN - shared session stuff
7171

72+
// grab this as early as possible before TogetherJS munges the URL
73+
var togetherjsInUrl = $.bbq.getState('togetherjs');
74+
7275
//var TogetherJSConfig_hubBase = "http://184.173.101.176:30035/"; // online
7376
var TogetherJSConfig_hubBase = "http://localhost:30035/"; // local
7477

@@ -132,6 +135,11 @@ function syncAppState(appState) {
132135

133136
// get OPT ready for integration with TogetherJS
134137
function initTogetherJS() {
138+
if (togetherjsInUrl) {
139+
$("#sharedSessionBtn").hide(); // hide ASAP!
140+
$("#togetherjsStatus").html("Please wait ... loading shared session");
141+
}
142+
135143
// This event triggers when you first join a session and say 'hello',
136144
// and then one of your peers says hello back to you. If they have the
137145
// exact same name as you, then change your own name to avoid ambiguity.
@@ -407,7 +415,7 @@ function TogetherjsCloseHandler() {
407415

408416
function startSharedSession() {
409417
$("#sharedSessionBtn").hide(); // hide ASAP!
410-
$("#togetherjsStatus").html("Please wait ... loading");
418+
$("#togetherjsStatus").html("Please wait ... loading shared session");
411419
TogetherJS();
412420
}
413421

‎v3/js/opt-frontend.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ function setHelpQueueSizeLabel() {
6060

6161
function requestTutor() {
6262
$("#getTutorBtn,#sharedSessionBtn,#surveyHeader").hide(); // hide ASAP!
63-
$("#togetherjsStatus").html("Please wait ... loading");
63+
$("#togetherjsStatus").html("Please wait ... requesting a tutor");
6464
tutorRequested = true;
6565
TogetherJS();
6666
}
6767

6868
function startSharedSession() { // override default
6969
$("#getTutorBtn,#sharedSessionBtn,#surveyHeader").hide(); // hide ASAP!
70-
$("#togetherjsStatus").html("Please wait ... loading");
70+
$("#togetherjsStatus").html("Please wait ... loading shared session");
7171
tutorRequested = false;
7272
TogetherJS();
7373
}

0 commit comments

Comments
 (0)