Made use of mediaWiki.loader for adding in mediawiki.legacy.diff for the change tab of jquery.wikiEditor.preview

This commit is contained in:
Trevor Parscal 2010-10-05 22:06:16 +00:00
parent 49eb154f2c
commit da918a5d68

View file

@ -117,13 +117,7 @@ fn: {
$.post( mediaWiki.config.get( 'wgScriptPath' ) + '/api.php', postdata2, function( data ) {
// Add diff CSS
if ( $( 'link[href=' + stylepath + '/common/diff.css]' ).size() == 0 ) {
$( 'head' ).append( $( '<link />' ).attr( {
'rel': 'stylesheet',
'type': 'text/css',
'href': stylepath + '/common/diff.css'
} ) );
}
mediaWiki.loader.load( 'mediawiki.legacy.diff' );
try {
var diff = data.query.pages[data.query.pageids[0]]
.revisions[0].diff['*'];