Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a188c64

Browse files
committed
s/autosave_notebook/set_autosave_interval/
1 parent 511bb2f commit a188c64

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

IPython/frontend/html/notebook/static/js/notebook.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,17 +1558,17 @@ var IPython = (function (IPython) {
15581558
/**
15591559
* Start an autosave timer, for periodically saving the notebook.
15601560
*
1561-
* @method autosave_notebook
1561+
* @method set_autosave_interval
15621562
* @param {Integer} interval the autosave interval in milliseconds
15631563
*/
1564-
Notebook.prototype.autosave_notebook = function (interval) {
1564+
Notebook.prototype.set_autosave_interval = function (interval) {
15651565
var that = this;
15661566
// clear previous interval, so we don't get simultaneous timers
15671567
if (this.autosave_timer) {
15681568
clearInterval(this.autosave_timer);
15691569
}
15701570

1571-
this.autosave_interval = interval;
1571+
this.autosave_interval = this.minimum_autosave_interval = interval;
15721572
if (interval) {
15731573
this.autosave_timer = setInterval(function() {
15741574
if (that.dirty) {
@@ -1646,7 +1646,7 @@ var IPython = (function (IPython) {
16461646
interval = 10000 * Math.round(interval / 10000);
16471647
// set new interval, if it's changed
16481648
if (interval != this.autosave_interval) {
1649-
this.autosave_notebook(interval);
1649+
this.set_autosave_interval(interval);
16501650
}
16511651
}
16521652
};

IPython/frontend/html/notebook/static/js/notebookmain.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ $(document).ready(function () {
8787
document.location.hash = '';
8888
document.location.hash = hash;
8989
}
90-
IPython.notebook.autosave_notebook(IPython.notebook.minimum_autosave_interval);
90+
IPython.notebook.set_autosave_interval(IPython.notebook.minimum_autosave_interval);
9191
// only do this once
9292
$([IPython.events]).off('notebook_loaded.Notebook', first_load);
9393
};

0 commit comments

Comments
 (0)