Changeset 24431
- Timestamp:
- 06/09/2013 12:45:01 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/autosave.js
r24397 r24431 3 3 jQuery(document).ready( function($) { 4 4 5 autosaveLast = ( $('#post #title').val() || '' ) + ( $('#post #content').val() || '' ); 5 if ( $('#wp-content-wrap').hasClass('tmce-active') && typeof tinymce != 'undefined' ) { 6 tinymce.onAddEditor.add( function( tinymce, editor ) { 7 if ( 'content' == editor.id ) { 8 editor.onLoad.add( function() { 9 editor.save(); 10 autosaveLast = ( $('#title').val() || '' ) + ( $('#content').val() || '' ); 11 }); 12 } 13 }); 14 } else { 15 autosaveLast = ( $('#title').val() || '' ) + ( $('#content').val() || '' ); 16 } 17 6 18 autosavePeriodical = $.schedule({time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }, repeat: true, protect: true}); 7 19
Note: See TracChangeset
for help on using the changeset viewer.