mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-15 19:49:30 +00:00
9975e83b9d
Change-Id: I614fe3c90c57511ba392493d683a5b6e8dc169d9
29 lines
731 B
JavaScript
29 lines
731 B
JavaScript
( function ( mw, $ ) {
|
|
var DiffPage = function () {
|
|
};
|
|
|
|
$.extend( DiffPage.prototype, {
|
|
refresh: function ( oldId, newId ) {
|
|
$( 'body' )
|
|
.find( 'table.diff[data-mw=\'interface\']' )
|
|
.append( '<div id="revision-slider-darkness"></div>' );
|
|
$.ajax( {
|
|
url: mw.util.wikiScript( 'index' ),
|
|
data: {
|
|
diff: newId,
|
|
oldid: oldId
|
|
},
|
|
success: function ( data ) {
|
|
data = $( '<div/>' ).html( data ).contents();
|
|
$( 'body' )
|
|
.find( 'table.diff[data-mw=\'interface\']' )
|
|
.html( data.find( 'table.diff[data-mw=\'interface\']' ) );
|
|
}
|
|
} );
|
|
}
|
|
} );
|
|
|
|
mw.libs.revisionSlider = mw.libs.revisionSlider || {};
|
|
mw.libs.revisionSlider.DiffPage = DiffPage;
|
|
}( mediaWiki, jQuery ) );
|