Add index on logging.log_user_text
[lhc/web/wiklou.git] / resources / mediawiki.page / mediawiki.page.ready.js
1 ( function ( mw, $ ) {
2 var supportsPlaceholder = 'placeholder' in document.createElement( 'input' );
3
4 mw.hook( 'wikipage.content' ).add( function ( $content ) {
5 var $sortableTables;
6
7 // Run jquery.placeholder polyfill if placeholder is not supported
8 if ( !supportsPlaceholder ) {
9 $content.find( 'input[placeholder]' ).placeholder();
10 }
11
12 // Run jquery.makeCollapsible
13 $content.find( '.mw-collapsible' ).makeCollapsible();
14
15 // Lazy load jquery.tablesorter
16 $sortableTables = $content.find( 'table.sortable' );
17 if ( $sortableTables.length ) {
18 mw.loader.using( 'jquery.tablesorter', function () {
19 $sortableTables.tablesorter();
20 } );
21 }
22
23 // Run jquery.checkboxShiftClick
24 $content.find( 'input[type="checkbox"]:not(.noshiftselect)' ).checkboxShiftClick();
25 } );
26
27 // Things outside the wikipage content
28 $( function () {
29
30 if ( !supportsPlaceholder ) {
31 // Exclude content to avoid hitting it twice for the (first) wikipage content
32 $( 'input[placeholder]' ).not( '#mw-content-text input' ).placeholder();
33 }
34
35 // Add accesskey hints to the tooltips
36 mw.util.updateTooltipAccessKeys();
37
38 } );
39
40 }( mediaWiki, jQuery ) );