wiki.techinc.nl/resources/mediawiki.page/mediawiki.page.ready.js
Krinkle be06bd4560 Enqueue mw.util.init in document-ready even handler earlier
* 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
2012-02-02 00:47:53 +00:00

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