mediawiki-extensions-Revisi.../modules/ext.RevisionSlider.DiffPage.js
addshore 9975e83b9d Don't allow interaction while page loading
Change-Id: I614fe3c90c57511ba392493d683a5b6e8dc169d9
2016-05-10 20:15:11 +01:00

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 ) );