// Hide active diff, used templates, old preview if shown
var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats',
- '#catlinks'];
+ '#catlinks', '#p-lang'];
var copySelector = copyElements.join(',');
$.each( copyElements, function(k,v) { $(v).fadeOut('fast'); } );
};
$(document).ready( function() {
- $('#wpPreview').click( doLivePreview );
+ // construct space for interwiki links if missing
+ // (it is usually not shown when action=edit, but shown if action=submit)
+ if ( !document.getElementById( 'p-lang' ) && document.getElementById( 'p-tb' ) ) {
+ // we need not hide this, because it's empty anyway
+ $( '#p-tb' ).after( $( '<div>' ).attr( 'id', 'p-lang' ) );
+ }
+
+ $( '#wpPreview' ).click( doLivePreview );
} );
}) ( jQuery );