From ea8a7745d8456bdfae0984b874af901e9875d198 Mon Sep 17 00:00:00 2001 From: Paul Ivanov Date: Thu, 9 Jan 2014 10:26:31 -0800 Subject: [PATCH] love javascript. it gives me many opportunities to be sarcastic in my commit messages --- IPython/html/static/notebook/js/outputarea.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js index a109c93c7..84372f7fe 100644 --- a/IPython/html/static/notebook/js/outputarea.js +++ b/IPython/html/static/notebook/js/outputarea.js @@ -506,7 +506,7 @@ var IPython = (function (IPython) { var type = OutputArea.display_order[type_i]; var append = OutputArea.append_map[type]; if ((json[type] !== undefined) && append) { - md = json.metadata || {}; + var md = json.metadata || {}; append.apply(this, [json[type], md, element]); return true; } @@ -516,7 +516,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_html = function (html, md, element) { - type = 'text/html'; + var type = 'text/html'; var toinsert = this.create_output_subarea(md, "output_html rendered_html", type); IPython.keyboard_manager.register_events(toinsert); toinsert.append(html); @@ -526,7 +526,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_javascript = function (js, md, container) { // We just eval the JS code, element appears in the local scope. - type = 'application/javascript'; + var type = 'application/javascript'; var element = this.create_output_subarea(md, "output_javascript", type); IPython.keyboard_manager.register_events(element); container.append(element); @@ -540,7 +540,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_text = function (data, md, element, extra_class) { - type = 'text/plain'; + var type = 'text/plain'; var toinsert = this.create_output_subarea(md, "output_text", type); // escape ANSI & HTML specials in plaintext: data = utils.fixConsole(data); @@ -555,7 +555,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_svg = function (svg, md, element) { - type = 'image/svg+xml'; + var type = 'image/svg+xml'; var toinsert = this.create_output_subarea(md, "output_svg", type); toinsert.append(svg); element.append(toinsert); @@ -590,7 +590,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_png = function (png, md, element) { - type = 'image/png'; + var type = 'image/png'; var toinsert = this.create_output_subarea(md, "output_png", type); var img = $(""); img[0].setAttribute('src','data:image/png;base64,'+png); @@ -607,7 +607,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_jpeg = function (jpeg, md, element) { - type = 'image/jpeg'; + var type = 'image/jpeg'; var toinsert = this.create_output_subarea(md, "output_jpeg", type); var img = $("").attr('src','data:image/jpeg;base64,'+jpeg); if (md['height']) { @@ -625,7 +625,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_latex = function (latex, md, element) { // This method cannot do the typesetting because the latex first has to // be on the page. - type = 'text/latex'; + var type = 'text/latex'; var toinsert = this.create_output_subarea(md, "output_latex", type); toinsert.append(latex); element.append(toinsert);