@@ -43,14 +43,6 @@ var preseededCurInstr = null; // if you passed in a 'curInstr=<number>' in the U
4343var myVisualizer = null ; // singleton ExecutionVisualizer instance
4444
4545
46- function enterEditMode ( ) {
47- $ . bbq . pushState ( { mode : 'edit' } , 2 /* completely override other hash strings to keep URL clean */ ) ;
48- }
49-
50- function enterDisplayNoFrillsMode ( ) {
51- $ . bbq . pushState ( { mode : 'display_no_frills' } , 2 /* completely override other hash strings to keep URL clean */ ) ;
52- }
53-
5446var pyInputCodeMirror ; // CodeMirror object that contains the input text
5547
5648function setCodeMirrorVal ( dat ) {
@@ -96,6 +88,7 @@ $(document).ready(function() {
9688 // thanks to http://benalman.com/projects/jquery-bbq-plugin/
9789 $ ( window ) . bind ( "hashchange" , function ( e ) {
9890 appMode = $ . bbq . getState ( 'mode' ) ; // assign this to the GLOBAL appMode
91+ //console.log("hashchange", appMode);
9992
10093 if ( appMode === undefined || appMode == 'edit' ) {
10194 $ ( "#pyInputPane" ) . show ( ) ;
@@ -201,13 +194,6 @@ $(document).ready(function() {
201194 //, hideCode: true,
202195 }
203196
204- function handleSuccessFunc ( ) {
205- // also scroll to top to make the UI more usable on smaller monitors
206- $ ( document ) . scrollTop ( 0 ) ;
207-
208- $ . bbq . pushState ( { mode : 'display' } , 2 /* completely override other hash strings to keep URL clean */ ) ;
209- }
210-
211197 function handleUncaughtExceptionFunc ( trace ) {
212198 if ( trace . length == 1 && trace [ 0 ] . line ) {
213199 var errorLineNo = trace [ 0 ] . line - 1 ; /* CodeMirror lines are zero-indexed */
@@ -232,7 +218,7 @@ $(document).ready(function() {
232218 backend_script , backendOptionsObj ,
233219 frontendOptionsObj ,
234220 'pyOutputPane' ,
235- handleSuccessFunc , handleUncaughtExceptionFunc ) ;
221+ enterDisplayMode , handleUncaughtExceptionFunc ) ;
236222 }
237223
238224 function executeCodeFromScratch ( ) {
0 commit comments