* Previously $(document).ready(mw.util.init) was in module 'mediawiki.page.ready' (position: bottom). I've now moved this to 'mediawiki.page.startup' so that it'll be enqueued sooner. * This making it more likely that if someone also enqueues in document-ready that mw.util.init ran before than and thus mw.util.$content populated * Fixes bug 33711 * All this is still depends on the order in which the event handler queue is executed, which is risky. Bug 30713 will bring the solid "watertight" solution
24 lines
654 B
JavaScript
24 lines
654 B
JavaScript
jQuery( document ).ready( function( $ ) {
|
|
|
|
/* Emulate placeholder if not supported by browser */
|
|
if ( !( 'placeholder' in document.createElement( 'input' ) ) ) {
|
|
$( 'input[placeholder]' ).placeholder();
|
|
}
|
|
|
|
/* Enable makeCollapsible */
|
|
$( '.mw-collapsible' ).makeCollapsible();
|
|
|
|
/* Lazy load jquery.tablesorter */
|
|
if ( $( 'table.sortable' ).length ) {
|
|
mw.loader.using( 'jquery.tablesorter', function() {
|
|
$( 'table.sortable' ).tablesorter();
|
|
});
|
|
}
|
|
|
|
/* Enable CheckboxShiftClick */
|
|
$( 'input[type=checkbox]:not(.noshiftselect)' ).checkboxShiftClick();
|
|
|
|
/* Add accesskey hints to the tooltips */
|
|
mw.util.updateTooltipAccessKeys();
|
|
|
|
} );
|