Make WordPress Core

Ticket #7392: 7392.7.diff

File 7392.7.diff, 1.3 KB (added by markjaquith, 11 years ago)

Without the debug cruft.

  • wp-includes/js/autosave.js

    var autosave, autosaveLast = '', autosavePeriodical, autosaveDelayPreview = fals 
    22
    33jQuery(document).ready( function($) {
    44
    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                                         if ( typeof switchEditors != 'undefined' ) {
    11                                                 autosaveLast = wp.autosave.getCompareString({
    12                                                         post_title : $('#title').val() || '',
    13                                                         content : switchEditors.pre_wpautop( $('#content').val() ) || '',
    14                                                         excerpt : $('#excerpt').val() || '',
    15                                                 });
    16                                         } else {
    17                                                 autosaveLast = wp.autosave.getCompareString();
    18                                         }
    19                                 });
    20                         }
     5        if ( $('#wp-content-wrap').hasClass('tmce-active') && typeof switchEditors != 'undefined' ) {
     6                autosaveLast = wp.autosave.getCompareString({
     7                        post_title : $('#title').val() || '',
     8                        content : switchEditors.pre_wpautop( $('#content').val() ) || '',
     9                        excerpt : $('#excerpt').val() || ''
    2110                });
    2211        } else {
    2312                autosaveLast = wp.autosave.getCompareString();