@@ -373,13 +373,14 @@ function initTogetherJS() {
373373
374374 $ ( "#sharedSessionBtn" ) . click ( startSharedSession ) ;
375375 $ ( "#stopTogetherJSBtn" ) . click ( TogetherJS ) ; // toggles off
376+ $ ( "#syncBtn" ) . click ( requestSync ) ;
376377
377378 // fired when TogetherJS is activated. might fire on page load if there's
378379 // already an open session from a prior page load in the recent past.
379380 TogetherJS . on ( "ready" , function ( ) {
380381 console . log ( "TogetherJS ready" ) ;
381382
382- $ ( "#stopTogetherJSBtn" ) . show ( ) ;
383+ $ ( "#stopTogetherJSBtn,#syncBtn " ) . show ( ) ;
383384 $ ( "#sharedSessionBtn" ) . hide ( ) ;
384385
385386 requestSync ( ) ; // immediately try to sync upon startup so that if
@@ -397,7 +398,7 @@ function initTogetherJS() {
397398 console . log ( "TogetherJS close" ) ;
398399
399400 $ ( "#togetherjsStatus" ) . html ( '' ) ; // clear it
400- $ ( "#stopTogetherJSBtn" ) . hide ( ) ;
401+ $ ( "#stopTogetherJSBtn,#syncBtn " ) . hide ( ) ;
401402 $ ( "#sharedSessionBtn" ) . show ( ) ;
402403
403404 TogetherjsCloseHandler ( ) ; // needs to be defined in each frontend
@@ -429,10 +430,8 @@ function populateTogetherJsShareUrl() {
429430 <input type="text" style="font-size: 10pt; \
430431 font-weight: bold; padding: 3px;\
431432 margin-bottom: 6pt;" \
432- id="togetherjsURL" size="80" readonly="readonly"/>\
433- <button id="syncBtn" type="button" style="font-size: 8pt;">Force sync</button>' ) ;
433+ id="togetherjsURL" size="80" readonly="readonly"/>' ) ;
434434 $ ( "#togetherjsURL" ) . val ( urlToShare ) . attr ( 'size' , urlToShare . length + 20 ) ;
435- $ ( "#syncBtn" ) . click ( requestSync ) ;
436435}
437436
438437// END - shared session stuff
0 commit comments