From 7240d2dafccff5686596e50e3f718a615d5dd874 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Fri, 14 Nov 2014 12:16:59 -0800 Subject: [PATCH] Just use notebook_path in download URLs notebook_name is now superfluous Closes gh-6937 --- IPython/html/static/notebook/js/menubar.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/IPython/html/static/notebook/js/menubar.js b/IPython/html/static/notebook/js/menubar.js index e187fed1f..495fbc564 100644 --- a/IPython/html/static/notebook/js/menubar.js +++ b/IPython/html/static/notebook/js/menubar.js @@ -69,7 +69,6 @@ define([ MenuBar.prototype._nbconvert = function (format, download) { download = download || false; var notebook_path = this.notebook.notebook_path; - var notebook_name = this.notebook.notebook_name; if (this.notebook.dirty) { this.notebook.save_notebook({async : false}); } @@ -78,7 +77,6 @@ define([ 'nbconvert', format, notebook_path, - notebook_name ) + "?download=" + download.toString(); window.open(url); @@ -120,17 +118,11 @@ define([ this.element.find('#download_ipynb').click(function () { var base_url = that.notebook.base_url; var notebook_path = that.notebook.notebook_path; - var notebook_name = that.notebook.notebook_name; if (that.notebook.dirty) { that.notebook.save_notebook({async : false}); } - var url = utils.url_join_encode( - base_url, - 'files', - notebook_path, - notebook_name - ); + var url = utils.url_join_encode(base_url, 'files', notebook_path); window.open(url + '?download=1'); });