mediawiki-extensions-Revisi.../modules/ext.RevisionSlider.DiffPage.js
addshore ddc1980f7b Update diff view on pointer move.
Bug: T134384
Change-Id: I26461f8afdfc3322f125a7f3c30d7f8f1b231398
2016-05-10 19:53:31 +01:00

26 lines
607 B
JavaScript

( function ( mw, $ ) {
var DiffPage = function () {
};
$.extend( DiffPage.prototype, {
refresh: function ( oldId, newId ) {
$.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 ) );