mediawiki-extensions-Revisi.../modules/ext.RevisionSlider.lazy.js
Ed Sanders e62f46dd80 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Icf10ea6bbc09542e69c0cd583a4ee4f2f76a3f43
2018-11-16 16:33:52 +00:00

22 lines
528 B
JavaScript

( function () {
var settings = new mw.libs.revisionSlider.Settings(),
autoExpand = settings.shouldAutoExpand();
if ( autoExpand ) {
mw.loader.load( 'ext.RevisionSlider.init' );
} else {
$( '.mw-revslider-toggle-button' ).click(
function () {
mw.loader.load( 'ext.RevisionSlider.init' );
}
);
}
$( '.mw-revslider-toggle-button' ).keypress( function ( event ) {
if ( event.which === 13 || event.which === 32 ) {
event.preventDefault();
$( '.mw-revslider-toggle-button' ).click();
}
} );
}() );