diff --git a/IPython/frontend/html/notebook/static/js/cell.js b/IPython/frontend/html/notebook/static/js/cell.js
index b186bd8..6806dd3 100644
--- a/IPython/frontend/html/notebook/static/js/cell.js
+++ b/IPython/frontend/html/notebook/static/js/cell.js
@@ -45,16 +45,16 @@ var IPython = (function (IPython) {
Cell.prototype.bind_events = function () {
var that = this;
- var nb = that.notebook
+ var nb = that.notebook;
that.element.click(function (event) {
if (that.selected === false) {
nb.select(nb.find_cell_index(that));
- };
+ }
});
that.element.focusin(function (event) {
if (that.selected === false) {
nb.select(nb.find_cell_index(that));
- };
+ }
});
};
diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js
index c96d4b2..8aa7441 100644
--- a/IPython/frontend/html/notebook/static/js/codecell.js
+++ b/IPython/frontend/html/notebook/static/js/codecell.js
@@ -44,7 +44,7 @@ var IPython = (function (IPython) {
var output = $('
').addClass('output vbox');
cell.append(input).append(output);
this.element = cell;
- this.collapse()
+ this.collapse();
};
//TODO, try to diminish the number of parameters.
@@ -123,7 +123,7 @@ var IPython = (function (IPython) {
return true;
} else {
return false;
- };
+ }
} else if (event.keyCode === 76 && event.ctrlKey && event.shiftKey
&& event.type == 'keydown') {
// toggle line numbers with Ctrl-Shift-L
@@ -138,10 +138,11 @@ var IPython = (function (IPython) {
if (ed_cur.line !== cc_cur.line || ed_cur.ch !== cc_cur.ch) {
this.is_completing = false;
this.completion_cursor = null;
- };
- };
+ }
+ }
return false;
};
+ return false;
};
CodeCell.prototype.remove_and_cancell_tooltip = function(timeout)
@@ -345,7 +346,7 @@ var IPython = (function (IPython) {
} else {
this.code_mirror.setOption('lineNumbers', false);
}
- this.code_mirror.refresh()
+ this.code_mirror.refresh();
};
CodeCell.prototype.select = function () {
@@ -447,7 +448,7 @@ var IPython = (function (IPython) {
CodeCell.prototype.append_display_data = function (json) {
var toinsert = this.create_output_area();
- this.append_mime_type(json, toinsert)
+ this.append_mime_type(json, toinsert);
this.element.find('div.output').append(toinsert);
// If we just output latex, typeset it.
if ( (json.latex !== undefined) || (json.html !== undefined) ) {
@@ -477,7 +478,7 @@ var IPython = (function (IPython) {
var toinsert = $("").addClass("box_flex1 output_subarea output_html rendered_html");
toinsert.append(html);
element.append(toinsert);
- }
+ };
CodeCell.prototype.append_text = function (data, element, extra_class) {
@@ -517,7 +518,7 @@ var IPython = (function (IPython) {
var toinsert = $("").addClass("box_flex1 output_subarea output_latex");
toinsert.append(latex);
element.append(toinsert);
- }
+ };
CodeCell.prototype.clear_output = function (stdout, stderr, other) {
@@ -589,7 +590,7 @@ var IPython = (function (IPython) {
CodeCell.prototype.set_input_prompt = function (number) {
var n = number || ' ';
- this.input_prompt_number = n
+ this.input_prompt_number = n;
this.element.find('div.input_prompt').html('In [' + n + ']:');
};
@@ -653,7 +654,7 @@ var IPython = (function (IPython) {
data.input = this.get_code();
data.cell_type = 'code';
if (this.input_prompt_number !== ' ') {
- data.prompt_number = this.input_prompt_number
+ data.prompt_number = this.input_prompt_number;
};
var outputs = [];
var len = this.outputs.length;
diff --git a/IPython/frontend/html/notebook/static/js/kernel.js b/IPython/frontend/html/notebook/static/js/kernel.js
index b3ae6ba..16f9445 100644
--- a/IPython/frontend/html/notebook/static/js/kernel.js
+++ b/IPython/frontend/html/notebook/static/js/kernel.js
@@ -23,9 +23,9 @@ var IPython = (function (IPython) {
this.session_id = utils.uuid();
if (typeof(WebSocket) !== 'undefined') {
- this.WebSocket = WebSocket
+ this.WebSocket = WebSocket;
} else if (typeof(MozWebSocket) !== 'undefined') {
- this.WebSocket = MozWebSocket
+ this.WebSocket = MozWebSocket;
} else {
alert('Your browser does not have WebSocket support, please try Chrome, Safari or Firefox ≥ 6. Firefox 4 and 5 are also supported by you have to enable WebSockets in about:config.');
};
@@ -44,13 +44,13 @@ var IPython = (function (IPython) {
parent_header : {}
};
return msg;
- }
+ };
Kernel.prototype.start = function (notebook_id, callback) {
var that = this;
if (!this.running) {
var qs = $.param({notebook:notebook_id});
- var url = this.base_url + '?' + qs
+ var url = this.base_url + '?' + qs;
$.post(url,
function (kernel_id) {
that._handle_start_kernel(kernel_id, callback);
@@ -95,10 +95,10 @@ var IPython = (function (IPython) {
" You will NOT be able to run code.
" +
" Your browser may not be compatible with the websocket version in the server," +
" or if the url does not look right, there could be an error in the" +
- " server's configuration."
+ " server's configuration.";
} else {
msg = "Websocket connection closed unexpectedly.
" +
- " The kernel will no longer be responsive."
+ " The kernel will no longer be responsive.";
}
var dialog = $('');
dialog.html(msg);
@@ -114,7 +114,7 @@ var IPython = (function (IPython) {
}
});
- }
+ };
Kernel.prototype.start_channels = function () {
var that = this;
@@ -125,7 +125,7 @@ var IPython = (function (IPython) {
this.iopub_channel = new this.WebSocket(ws_url + "/iopub");
send_cookie = function(){
this.send(document.cookie);
- }
+ };
var already_called_onclose = false; // only alert once
ws_closed_early = function(evt){
if (already_called_onclose){
@@ -135,7 +135,7 @@ var IPython = (function (IPython) {
if ( ! evt.wasClean ){
that._websocket_closed(ws_url, true);
}
- }
+ };
ws_closed_late = function(evt){
if (already_called_onclose){
return;
@@ -144,7 +144,7 @@ var IPython = (function (IPython) {
if ( ! evt.wasClean ){
that._websocket_closed(ws_url, false);
}
- }
+ };
this.shell_channel.onopen = send_cookie;
this.shell_channel.onclose = ws_closed_early;
this.iopub_channel.onopen = send_cookie;
@@ -159,12 +159,12 @@ var IPython = (function (IPython) {
Kernel.prototype.stop_channels = function () {
if (this.shell_channel !== null) {
- this.shell_channel.onclose = function (evt) {null};
+ this.shell_channel.onclose = function (evt) {};
this.shell_channel.close();
this.shell_channel = null;
};
if (this.iopub_channel !== null) {
- this.iopub_channel.onclose = function (evt) {null};
+ this.iopub_channel.onclose = function (evt) {};
this.iopub_channel.close();
this.iopub_channel = null;
};
@@ -189,12 +189,12 @@ var IPython = (function (IPython) {
silent : false,
user_variables : [],
user_expressions : {},
- allow_stdin : false,
+ allow_stdin : false
};
var msg = this.get_msg("execute_request", content);
this.shell_channel.send(JSON.stringify(msg));
return msg.header.msg_id;
- }
+ };
Kernel.prototype.complete = function (line, cursor_pos) {
@@ -206,7 +206,7 @@ var IPython = (function (IPython) {
var msg = this.get_msg("complete_request", content);
this.shell_channel.send(JSON.stringify(msg));
return msg.header.msg_id;
- }
+ };
Kernel.prototype.interrupt = function () {
@@ -221,7 +221,7 @@ var IPython = (function (IPython) {
this.running = false;
var settings = {
cache : false,
- type : "DELETE",
+ type : "DELETE"
};
$.ajax(this.kernel_url, settings);
};
diff --git a/IPython/frontend/html/notebook/static/js/kernelstatus.js b/IPython/frontend/html/notebook/static/js/kernelstatus.js
index def9db2..da18a06 100644
--- a/IPython/frontend/html/notebook/static/js/kernelstatus.js
+++ b/IPython/frontend/html/notebook/static/js/kernelstatus.js
@@ -26,7 +26,7 @@ var IPython = (function (IPython) {
this.element.addClass('ui-widget');
this.element.attr('title', "The kernel execution status." +
" If 'Busy', the kernel is currently running code." +
- " If 'Idle', it is available for execution.")
+ " If 'Idle', it is available for execution.");
};
diff --git a/IPython/frontend/html/notebook/static/js/layout.js b/IPython/frontend/html/notebook/static/js/layout.js
index 515cf74..bf3e209 100644
--- a/IPython/frontend/html/notebook/static/js/layout.js
+++ b/IPython/frontend/html/notebook/static/js/layout.js
@@ -54,7 +54,7 @@ var IPython = (function (IPython) {
}
};
- IPython.LayoutManager = LayoutManager
+ IPython.LayoutManager = LayoutManager;
return IPython;
diff --git a/IPython/frontend/html/notebook/static/js/leftpanel.js b/IPython/frontend/html/notebook/static/js/leftpanel.js
index 5eb02e1..d5e2003 100644
--- a/IPython/frontend/html/notebook/static/js/leftpanel.js
+++ b/IPython/frontend/html/notebook/static/js/leftpanel.js
@@ -71,7 +71,7 @@ var IPython = (function (IPython) {
this.kernel_section = new IPython.KernelSection('div#kernel_section');
}
this.help_section = new IPython.HelpSection('div#help_section');
- }
+ };
LeftPanel.prototype.collapse = function () {
if (this.expanded === true) {
diff --git a/IPython/frontend/html/notebook/static/js/namespace.js b/IPython/frontend/html/notebook/static/js/namespace.js
index 2ded1eb..9c17386 100644
--- a/IPython/frontend/html/notebook/static/js/namespace.js
+++ b/IPython/frontend/html/notebook/static/js/namespace.js
@@ -20,7 +20,7 @@ IPython.namespace = function (ns_string) {
for (i=0; i= 0) {
- var pivot = this.cell_elements().eq(i+1)
- var tomove = this.cell_elements().eq(i)
+ var pivot = this.cell_elements().eq(i+1);
+ var tomove = this.cell_elements().eq(i);
if (pivot !== null && tomove !== null) {
tomove.detach();
pivot.after(tomove);
@@ -439,7 +441,7 @@ var IPython = (function (IPython) {
};
this.dirty = true;
return this;
- }
+ };
Notebook.prototype.sort_cells = function () {
@@ -447,7 +449,7 @@ var IPython = (function (IPython) {
var sindex = this.selected_index();
var swapped;
do {
- swapped = false
+ swapped = false;
for (var i=1; iCancel').button().
diff --git a/IPython/frontend/html/notebook/static/js/notebookmain.js b/IPython/frontend/html/notebook/static/js/notebookmain.js
index 78e4c05..c3cb70a 100644
--- a/IPython/frontend/html/notebook/static/js/notebookmain.js
+++ b/IPython/frontend/html/notebook/static/js/notebookmain.js
@@ -15,7 +15,7 @@ $(document).ready(function () {
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
- displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
+ displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
},
displayAlign: 'left', // Change this to 'center' to center equations.
"HTML-CSS": {
@@ -76,7 +76,7 @@ $(document).ready(function () {
// and finally unhide the panel contents after collapse
setTimeout(function(){
IPython.left_panel.left_panel_element.css('visibility', 'visible');
- }, 200)
+ }, 200);
}
},100);
});
diff --git a/IPython/frontend/html/notebook/static/js/panelsection.js b/IPython/frontend/html/notebook/static/js/panelsection.js
index a99e828..191da5a 100644
--- a/IPython/frontend/html/notebook/static/js/panelsection.js
+++ b/IPython/frontend/html/notebook/static/js/panelsection.js
@@ -186,18 +186,18 @@ var IPython = (function (IPython) {
this.content.find('#move_cell_down').attr('title', "Move selected cell down one in the Notebook");
this.content.find('#cell_type').buttonset();
- this.content.find('#to_markdown').attr('title', 'Change selected cell to markdown (for text)')
- this.content.find('#to_code').attr('title', 'Change selected cell to code (for execution)')
+ this.content.find('#to_markdown').attr('title', 'Change selected cell to markdown (for text)');
+ this.content.find('#to_code').attr('title', 'Change selected cell to code (for execution)');
this.content.find('#cell_output').buttonset();
- this.content.find('#toggle_output').attr('title', 'Toggle visibility of the output of code cells')
- this.content.find('#clear_all_output').attr('title', 'Clear output of all code cells (actually removes the data, unlike toggle)')
+ this.content.find('#toggle_output').attr('title', 'Toggle visibility of the output of code cells');
+ this.content.find('#clear_all_output').attr('title', 'Clear output of all code cells (actually removes the data, unlike toggle)');
this.content.find('#run_cells').buttonset();
- this.content.find('#run_selected_cell').attr('title', 'Submit the selected cell for execution')
- this.content.find('#run_all_cells').attr('title', 'Run *all* code cells in the notebook in order')
- this.content.find('#autoindent').attr('title', 'Autoindent code as-you-type')
- this.content.find('#autoindent_label').attr('title', 'Autoindent code as-you-type')
+ this.content.find('#run_selected_cell').attr('title', 'Submit the selected cell for execution');
+ this.content.find('#run_all_cells').attr('title', 'Run *all* code cells in the notebook in order');
+ this.content.find('#autoindent').attr('title', 'Autoindent code as-you-type');
+ this.content.find('#autoindent_label').attr('title', 'Autoindent code as-you-type');
};
@@ -304,12 +304,12 @@ var IPython = (function (IPython) {
this.content.find('#help_buttons0').buttonset();
this.content.find('#help_buttons1').buttonset();
this.content.find('#help_buttons2').buttonset();
- this.content.find('#python_help').attr('title', "Open the online Python documentation in a new tab")
- this.content.find('#ipython_help').attr('title', "Open the online IPython documentation in a new tab")
- this.content.find('#numpy_help').attr('title', "Open the online NumPy documentation in a new tab")
- this.content.find('#scipy_help').attr('title', "Open the online SciPy documentation in a new tab")
- this.content.find('#matplotlib_help').attr('title', "Open the online Matplotlib documentation in a new tab")
- this.content.find('#sympy_help').attr('title', "Open the online SymPy documentation in a new tab")
+ this.content.find('#python_help').attr('title', "Open the online Python documentation in a new tab");
+ this.content.find('#ipython_help').attr('title', "Open the online IPython documentation in a new tab");
+ this.content.find('#numpy_help').attr('title', "Open the online NumPy documentation in a new tab");
+ this.content.find('#scipy_help').attr('title', "Open the online SciPy documentation in a new tab");
+ this.content.find('#matplotlib_help').attr('title', "Open the online Matplotlib documentation in a new tab");
+ this.content.find('#sympy_help').attr('title', "Open the online SymPy documentation in a new tab");
};
diff --git a/IPython/frontend/html/notebook/static/js/savewidget.js b/IPython/frontend/html/notebook/static/js/savewidget.js
index 2c7f631..673aee2 100644
--- a/IPython/frontend/html/notebook/static/js/savewidget.js
+++ b/IPython/frontend/html/notebook/static/js/savewidget.js
@@ -15,7 +15,7 @@ var IPython = (function (IPython) {
var SaveWidget = function (selector) {
this.selector = selector;
- this.notebook_name_blacklist_re = /[\/\\]/
+ this.notebook_name_blacklist_re = /[\/\\]/;
this.last_saved_name = '';
if (this.selector !== undefined) {
this.element = $(selector);
@@ -70,14 +70,14 @@ var IPython = (function (IPython) {
SaveWidget.prototype.get_notebook_name = function () {
return this.element.find('input#notebook_name').attr('value');
- }
+ };
SaveWidget.prototype.set_notebook_name = function (nbname) {
this.element.find('input#notebook_name').attr('value',nbname);
this.set_document_title();
this.last_saved_name = nbname;
- }
+ };
SaveWidget.prototype.set_document_title = function () {
diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js
index 817c0dc..55a9887 100644
--- a/IPython/frontend/html/notebook/static/js/textcell.js
+++ b/IPython/frontend/html/notebook/static/js/textcell.js
@@ -34,7 +34,7 @@ var IPython = (function (IPython) {
mode: this.code_mirror_mode,
theme: 'default',
value: this.placeholder,
- readOnly: this.read_only,
+ readOnly: this.read_only
});
// The tabindex=-1 makes this div focusable.
var render_area = $('').addClass('text_cell_render').
@@ -52,8 +52,8 @@ var IPython = (function (IPython) {
if (that.rendered) {
that.edit();
event.preventDefault();
- };
- };
+ }
+ }
});
};
@@ -77,8 +77,8 @@ var IPython = (function (IPython) {
this.rendered = false;
if (this.get_source() === this.placeholder) {
this.set_source('');
- };
- };
+ }
+ }
};
@@ -145,13 +145,13 @@ var IPython = (function (IPython) {
this.set_rendered(data.rendered || '');
this.rendered = false;
this.render();
- };
- };
+ }
+ }
};
TextCell.prototype.toJSON = function () {
- var data = {}
+ var data = {};
data.cell_type = this.cell_type;
data.source = this.get_source();
return data;
@@ -173,13 +173,13 @@ var IPython = (function (IPython) {
HTMLCell.prototype.render = function () {
if (this.rendered === false) {
var text = this.get_source();
- if (text === "") {text = this.placeholder;};
+ if (text === "") { text = this.placeholder; }
this.set_rendered(text);
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
this.element.find('div.text_cell_input').hide();
this.element.find("div.text_cell_render").show();
this.rendered = true;
- };
+ }
};
@@ -198,7 +198,7 @@ var IPython = (function (IPython) {
MarkdownCell.prototype.render = function () {
if (this.rendered === false) {
var text = this.get_source();
- if (text === "") {text = this.placeholder;};
+ if (text === "") { text = this.placeholder; }
var html = IPython.markdown_converter.makeHtml(text);
this.set_rendered(html);
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
@@ -217,7 +217,7 @@ var IPython = (function (IPython) {
return '' + code + '
';
});
this.rendered = true;
- };
+ }
};
@@ -234,9 +234,9 @@ var IPython = (function (IPython) {
RSTCell.prototype.render = function () {
- if (this.rendered === false) {
+ if (this.rendered === false) {
var text = this.get_source();
- if (text === "") {text = this.placeholder;};
+ if (text === "") { text = this.placeholder; }
var settings = {
processData : false,
cache : false,
@@ -249,7 +249,7 @@ var IPython = (function (IPython) {
this.element.find('div.text_cell_input').hide();
this.element.find("div.text_cell_render").show();
this.set_rendered("Rendering...");
- };
+ }
};
diff --git a/IPython/frontend/html/notebook/static/js/utils.js b/IPython/frontend/html/notebook/static/js/utils.js
index f81c7d4..bce44b3 100644
--- a/IPython/frontend/html/notebook/static/js/utils.js
+++ b/IPython/frontend/html/notebook/static/js/utils.js
@@ -9,7 +9,7 @@
// Utilities
//============================================================================
-IPython.namespace('IPython.utils')
+IPython.namespace('IPython.utils');
IPython.utils = (function (IPython) {
@@ -35,7 +35,7 @@ IPython.utils = (function (IPython) {
.replace(/>/g,'&'+'gt;')
.replace(/\'/g,'&'+'apos;')
.replace(/\"/g,'&'+'quot;')
- .replace(/`/g,'&'+'#96;')
+ .replace(/`/g,'&'+'#96;');
}
@@ -45,32 +45,32 @@ IPython.utils = (function (IPython) {
"32":"ansigreen", "33":"ansiyellow",
"34":"ansiblue", "35":"ansipurple","36":"ansicyan",
"37":"ansigrey", "01":"ansibold"
- }
+ };
// Transform ANI color escape codes into HTML tags with css
// classes listed in the above ansi_colormap object. The actual color used
// are set in the css file.
function fixConsole(txt) {
- txt = xmlencode(txt)
- var re = /\033\[([\d;]*?)m/
- var opened = false
- var cmds = []
- var opener = ""
- var closer = ""
+ txt = xmlencode(txt);
+ var re = /\033\[([\d;]*?)m/;
+ var opened = false;
+ var cmds = [];
+ var opener = "";
+ var closer = "";
while (re.test(txt)) {
- var cmds = txt.match(re)[1].split(";")
- closer = opened?"":""
- opened = cmds.length > 1 || cmds[0] != 0
- var rep = []
+ var cmds = txt.match(re)[1].split(";");
+ closer = opened?"":"";
+ opened = cmds.length > 1 || cmds[0] != 0;
+ var rep = [];
for (var i in cmds)
if (typeof(ansi_colormap[cmds[i]]) != "undefined")
- rep.push(ansi_colormap[cmds[i]])
- opener = rep.length > 0?"":""
- txt = txt.replace(re, closer + opener)
+ rep.push(ansi_colormap[cmds[i]]);
+ opener = rep.length > 0?"":"";
+ txt = txt.replace(re, closer + opener);
}
- if (opened) txt += ""
- return txt
+ if (opened) txt += "";
+ return txt;
}
@@ -95,7 +95,7 @@ IPython.utils = (function (IPython) {
uuid : uuid,
fixConsole : fixConsole,
grow : grow
- }
+ };
}(IPython));