From a8e1cc3666d6f7852372528d2e6b791a94b13e5a 2015-01-27 20:21:44 From: Matthias Bussonnier Date: 2015-01-27 20:21:44 Subject: [PATCH] make some target _blank configurable there seem to be "only" 2 places where this make sens, the other being href in mdcell, detach pager, help link in new windows. set IPython._target = '_self' for try.jupyter.org shoudl work in custom.js --- diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index 10a937b..4fa362f 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -293,7 +293,7 @@ define([ // directory nav doesn't open new tabs // files, notebooks do if (model.type !== "directory") { - link.attr('target','_blank'); + link.attr('target',IPython._target||'_blank'); } if (model.type !== 'directory') { this.add_duplicate_button(item); diff --git a/IPython/html/static/tree/js/terminallist.js b/IPython/html/static/tree/js/terminallist.js index b7524ce..6cb8f1c 100644 --- a/IPython/html/static/tree/js/terminallist.js +++ b/IPython/html/static/tree/js/terminallist.js @@ -93,7 +93,7 @@ define([ item.find(".item_icon").addClass("fa fa-terminal"); var link = item.find("a.item_link") .attr('href', utils.url_join_encode(this.base_url, "terminals", name)); - link.attr('target', '_blank'); + link.attr('target', IPython._target||'_blank'); this.add_shutdown_button(name, item); };