trigger hash on notebook load

enables direct links to anchors within notebooks
MinRK 13 years ago
parent ba4b1d6e1c
commit 7e6b5d98c7

@ -82,6 +82,11 @@ $(document).ready(function () {
IPython.layout_manager.do_resize();
$([IPython.events]).on('notebook_loaded.Notebook', function () {
IPython.layout_manager.do_resize();
var hash = document.location.hash;
if (hash) {
document.location.hash = '';
document.location.hash = hash;
}
});
IPython.notebook.load_notebook($('body').data('notebookId'));

Loading…
Cancel
Save