@@ -110,40 +110,40 @@ function TogetherjsCloseHandler() {
110110}
111111
112112function getBaseBackendOptionsObj ( ) {
113- var backendOptionsObj = { cumulative_mode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'true' ) ,
114- heap_primitives : ( $ ( '#heapPrimitivesSelector' ) . val ( ) == 'true' ) ,
115- show_only_outputs : false ,
116- py_crazy_mode : ( $ ( '#pythonVersionSelector' ) . val ( ) == '2crazy' ) ,
117- origin : originFrontendJsFile } ;
113+ var ret = { cumulative_mode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'true' ) ,
114+ heap_primitives : ( $ ( '#heapPrimitivesSelector' ) . val ( ) == 'true' ) ,
115+ show_only_outputs : false ,
116+ py_crazy_mode : ( $ ( '#pythonVersionSelector' ) . val ( ) == '2crazy' ) ,
117+ origin : originFrontendJsFile } ;
118118
119119 var surveyObj = getSurveyObject ( ) ;
120120 if ( surveyObj ) {
121- backendOptionsObj . survey = surveyObj ;
121+ ret . survey = surveyObj ;
122122 }
123123
124- return backendOptionsObj ;
124+ return ret ;
125125}
126126
127127function getBaseFrontendOptionsObj ( ) {
128- var frontendOptionsObj = { // tricky: selector 'true' and 'false' values are strings!
129- disableHeapNesting : ( $ ( '#heapPrimitivesSelector' ) . val ( ) == 'true' ) ,
130- textualMemoryLabels : ( $ ( '#textualMemoryLabelsSelector' ) . val ( ) == 'true' ) ,
131- executeCodeWithRawInputFunc : executeCodeWithRawInput ,
132-
133- // always use the same visualizer ID for all
134- // instantiated ExecutionVisualizer objects,
135- // so that they can sync properly across
136- // multiple clients using TogetherJS. this
137- // shouldn't lead to problems since only ONE
138- // ExecutionVisualizer will be shown at a time
139- visualizerIdOverride : '1' ,
140- updateOutputCallback : function ( ) { $ ( '#urlOutput,#embedCodeOutput' ) . val ( '' ) ; } ,
141-
142- // undocumented experimental modes:
143- pyCrazyMode : ( $ ( '#pythonVersionSelector' ) . val ( ) == '2crazy' ) ,
144- holisticMode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'holistic' )
145- }
146- return frontendOptionsObj ;
128+ var ret = { // tricky: selector 'true' and 'false' values are strings!
129+ disableHeapNesting : ( $ ( '#heapPrimitivesSelector' ) . val ( ) == 'true' ) ,
130+ textualMemoryLabels : ( $ ( '#textualMemoryLabelsSelector' ) . val ( ) == 'true' ) ,
131+ executeCodeWithRawInputFunc : executeCodeWithRawInput ,
132+
133+ // always use the same visualizer ID for all
134+ // instantiated ExecutionVisualizer objects,
135+ // so that they can sync properly across
136+ // multiple clients using TogetherJS. this
137+ // shouldn't lead to problems since only ONE
138+ // ExecutionVisualizer will be shown at a time
139+ visualizerIdOverride : '1' ,
140+ updateOutputCallback : function ( ) { $ ( '#urlOutput,#embedCodeOutput' ) . val ( '' ) ; } ,
141+
142+ // undocumented experimental modes:
143+ pyCrazyMode : ( $ ( '#pythonVersionSelector' ) . val ( ) == '2crazy' ) ,
144+ holisticMode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'holistic' )
145+ } ;
146+ return ret ;
147147}
148148
149149function executeCode ( forceStartingInstr , forceRawInputLst ) {
@@ -167,7 +167,6 @@ function executeCode(forceStartingInstr, forceRawInputLst) {
167167}
168168
169169
170-
171170// domID is the ID of the element to attach to (without the leading '#' sign)
172171function SyntaxErrorSurveyBubble ( parentViz , domID ) {
173172 this . parentViz = parentViz ;
0 commit comments