@@ -11,10 +11,6 @@ define([
11
11
] , function ( Jupyter , $ , require , events , configmod , utils , codecell ) {
12
12
"use strict" ;
13
13
14
- var base_url = utils . get_body_data ( "baseUrl" ) ;
15
- var config = new configmod . ConfigSection ( 'notebook' , {
16
- base_url : base_url
17
- } ) ;
18
14
var run_list = [ ] ; /* list of cells to be run */
19
15
20
16
// define default config parameter values
@@ -33,15 +29,6 @@ define([
33
29
run_color : '#f30a2d'
34
30
} ;
35
31
36
- // updates default params with any specified in the provided config data
37
- var update_params = function ( config_data ) {
38
- for ( var key in params ) {
39
- if ( config_data . hasOwnProperty ( key ) ) {
40
- params [ key ] = config_data [ key ] ;
41
- }
42
- }
43
- } ;
44
-
45
32
/**
46
33
* Add event if user clicks on codemirror gutter
47
34
*
@@ -70,9 +57,7 @@ define([
70
57
* Initialize toolbar and gutter after config was loaded
71
58
*/
72
59
function initialize ( ) {
73
- if ( Jupyter . notebook . config . data . hasOwnProperty ( 'runtools' ) ) {
74
- update_params ( Jupyter . notebook . config . data . runtools )
75
- }
60
+ $ . extend ( true , params , Jupyter . notebook . config . data . runtools ) ;
76
61
77
62
add_gutter_events ( ) ;
78
63
@@ -773,11 +758,9 @@ define([
773
758
events . one ( 'notebook_loaded.Notebook' , initGutter ) ;
774
759
}
775
760
} ) ;
776
- config . load ( )
761
+ Jupyter . notebook . config . loaded . then ( initialize ) ;
777
762
} ;
778
763
779
- Jupyter . notebook . config . loaded . then ( initialize ) ;
780
-
781
764
return {
782
765
load_jupyter_extension : load_extension ,
783
766
load_ipython_extension : load_extension
0 commit comments