Show More
@@ -1558,17 +1558,17 var IPython = (function (IPython) { | |||
|
1558 | 1558 | /** |
|
1559 | 1559 | * Start an autosave timer, for periodically saving the notebook. |
|
1560 | 1560 | * |
|
1561 |
* @method autosave_ |
|
|
1561 | * @method set_autosave_interval | |
|
1562 | 1562 | * @param {Integer} interval the autosave interval in milliseconds |
|
1563 | 1563 | */ |
|
1564 |
Notebook.prototype.autosave_ |
|
|
1564 | Notebook.prototype.set_autosave_interval = function (interval) { | |
|
1565 | 1565 | var that = this; |
|
1566 | 1566 | // clear previous interval, so we don't get simultaneous timers |
|
1567 | 1567 | if (this.autosave_timer) { |
|
1568 | 1568 | clearInterval(this.autosave_timer); |
|
1569 | 1569 | } |
|
1570 | 1570 | |
|
1571 | this.autosave_interval = interval; | |
|
1571 | this.autosave_interval = this.minimum_autosave_interval = interval; | |
|
1572 | 1572 | if (interval) { |
|
1573 | 1573 | this.autosave_timer = setInterval(function() { |
|
1574 | 1574 | if (that.dirty) { |
@@ -1646,7 +1646,7 var IPython = (function (IPython) { | |||
|
1646 | 1646 | interval = 10000 * Math.round(interval / 10000); |
|
1647 | 1647 | // set new interval, if it's changed |
|
1648 | 1648 | if (interval != this.autosave_interval) { |
|
1649 |
this.autosave_ |
|
|
1649 | this.set_autosave_interval(interval); | |
|
1650 | 1650 | } |
|
1651 | 1651 | } |
|
1652 | 1652 | }; |
@@ -87,7 +87,7 $(document).ready(function () { | |||
|
87 | 87 | document.location.hash = ''; |
|
88 | 88 | document.location.hash = hash; |
|
89 | 89 | } |
|
90 |
IPython.notebook.autosave_ |
|
|
90 | IPython.notebook.set_autosave_interval(IPython.notebook.minimum_autosave_interval); | |
|
91 | 91 | // only do this once |
|
92 | 92 | $([IPython.events]).off('notebook_loaded.Notebook', first_load); |
|
93 | 93 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now