diff --git a/notebook/static/notebook/js/main.js b/notebook/static/notebook/js/main.js index 3133b5ca1..1c1c40d8e 100644 --- a/notebook/static/notebook/js/main.js +++ b/notebook/static/notebook/js/main.js @@ -138,17 +138,14 @@ require([ page.show(); - var first_load = function () { + events.one('notebook_loaded.Notebook', function () { var hash = document.location.hash; if (hash) { document.location.hash = ''; document.location.hash = hash; } notebook.set_autosave_interval(notebook.minimum_autosave_interval); - // only do this once - events.off('notebook_loaded.Notebook', first_load); - }; - events.on('notebook_loaded.Notebook', first_load); + }); IPython.page = page; IPython.notebook = notebook;