Make WordPress Core


Ignore:
Timestamp:
10/30/2006 08:18:59 PM (18 years ago)
Author:
ryan
Message:

Autosave periodical executor from masquerade. fixes #3195

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/autosave.js.php

    r4424 r4433  
    33?>
    44var autosaveLast = '';
    5 function autosave_timer() {
    6     autosave();
    7     setTimeout("autosave_timer()", <?php echo apply_filters('autosave_interval', '60000') ?>);
    8 }
    9 
     5var autosavePeriodical;
    106function autosave_start_timer() {
    117    var form = $('post');
    128    autosaveLast = form.post_title.value+form.content.value;
    13     setTimeout("autosave_timer()", <?php echo apply_filters('autosave_start_delay', '60000') ?>);
     9    autosavePerodical = new PeriodicalExecutor(autosave, <?php echo apply_filters('autosave_interval', '60000'); ?>);
    1410}
    1511addLoadEvent(autosave_start_timer)
     
    8177        autosaveAjax.setVar("content", form.content.value);
    8278    } else {
     79        // Don't run while the TinyMCE spellcheck is on.
    8380        if(tinyMCE.selectedInstance.spellcheckerOn) return;
    8481        tinyMCE.wpTriggerSave();
Note: See TracChangeset for help on using the changeset viewer.