// Hide active diff, used templates, old preview if shown
var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats',
- '#catlinks', '#p-lang'];
+ '#catlinks', '#p-lang', '.mw-summary-preview'];
var copySelector = copyElements.join(',');
$.each( copyElements, function(k,v) { $(v).fadeOut('fast'); } );
$( '#p-tb' ).after( $( '<div>' ).attr( 'id', 'p-lang' ) );
}
+ // construct space for summary preview if missing
+ if ( $( '.mw-summary-preview' ).length === 0 ) {
+ $( '.editCheckboxes' ).before( $( '<div>' ).addClass( 'mw-summary-preview' ) );
+ }
+
$( '#wpPreview' ).click( doLivePreview );
} );
}) ( jQuery );