diff --git a/remote_notebook/Dockerfile b/remote_notebook/Dockerfile index 53a1842dd..5c54cb150 100644 --- a/remote_notebook/Dockerfile +++ b/remote_notebook/Dockerfile @@ -21,6 +21,8 @@ COPY seahorse_notebook_path /usr/local/lib/python2.7/site-packages COPY jupyter_notebook_config.py /home/jovyan/.jupyter COPY wmcontents /opt/conda/lib/python3.5/site-packages/wmcontents +RUN mkdir -p /home/jovyan/.jupyter/custom +COPY custom.js /home/jovyan/.jupyter/custom # seahorse_notebook_path is copied two times, because it is needed # by forwarding_kernel (python 2.7) and by notebook server (python 3.5) diff --git a/remote_notebook/custom.js b/remote_notebook/custom.js new file mode 100644 index 000000000..6c87bcc50 --- /dev/null +++ b/remote_notebook/custom.js @@ -0,0 +1,12 @@ +define([ + 'base/js/namespace', + 'base/js/events' + ], + function(IPython, events) { + events.on('kernel_connected.Kernel', + function () { + IPython.notebook.set_autosave_interval(5000); //in milliseconds + } + ); + } +);