Ticket #3195: autosave-prototype-periodicalexecutor.diff
File autosave-prototype-periodicalexecutor.diff, 1.2 KB (added by , 18 years ago) |
---|
-
wp-includes/js/autosave.js.php
2 2 cache_javascript_headers(); 3 3 ?> 4 4 var autosaveLast = ''; 5 function autosave_timer() { 6 autosave(); 7 setTimeout("autosave_timer()", <?php echo apply_filters('autosave_interval', '60000') ?>); 8 } 9 5 var autosavePeriodical; 10 6 function autosave_start_timer() { 11 7 var form = $('post'); 12 8 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'); ?>); 14 10 } 15 11 addLoadEvent(autosave_start_timer) 16 12 … … 80 76 if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 || rich == false ) { 81 77 autosaveAjax.setVar("content", form.content.value); 82 78 } else { 79 // Don't run while the TinyMCE spellcheck is on. 83 80 if(tinyMCE.selectedInstance.spellcheckerOn) return; 84 81 tinyMCE.wpTriggerSave(); 85 82 autosaveAjax.setVar("content", form.content.value);