summaryrefslogtreecommitdiff
path: root/resources/mediawiki.page/mediawiki.page.ready.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /resources/mediawiki.page/mediawiki.page.ready.js
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'resources/mediawiki.page/mediawiki.page.ready.js')
-rw-r--r--resources/mediawiki.page/mediawiki.page.ready.js40
1 files changed, 22 insertions, 18 deletions
diff --git a/resources/mediawiki.page/mediawiki.page.ready.js b/resources/mediawiki.page/mediawiki.page.ready.js
index 370c3a19..684f582f 100644
--- a/resources/mediawiki.page/mediawiki.page.ready.js
+++ b/resources/mediawiki.page/mediawiki.page.ready.js
@@ -1,24 +1,28 @@
-jQuery( document ).ready( function( $ ) {
+( function ( mw, $ ) {
+ $( function () {
+ var $sortableTables;
- /* Emulate placeholder if not supported by browser */
- if ( !( 'placeholder' in document.createElement( 'input' ) ) ) {
- $( 'input[placeholder]' ).placeholder();
- }
+ /* Emulate placeholder if not supported by browser */
+ if ( !( 'placeholder' in document.createElement( 'input' ) ) ) {
+ $( 'input[placeholder]' ).placeholder();
+ }
- /* Enable makeCollapsible */
- $( '.mw-collapsible' ).makeCollapsible();
+ /* Enable makeCollapsible */
+ $( '.mw-collapsible' ).makeCollapsible();
- /* Lazy load jquery.tablesorter */
- if ( $( 'table.sortable' ).length ) {
- mw.loader.using( 'jquery.tablesorter', function() {
- $( 'table.sortable' ).tablesorter();
- });
- }
+ /* Lazy load jquery.tablesorter */
+ $sortableTables = $( 'table.sortable' );
+ if ( $sortableTables.length ) {
+ mw.loader.using( 'jquery.tablesorter', function () {
+ $sortableTables.tablesorter();
+ });
+ }
- /* Enable CheckboxShiftClick */
- $( 'input[type=checkbox]:not(.noshiftselect)' ).checkboxShiftClick();
+ /* Enable CheckboxShiftClick */
+ $( 'input[type=checkbox]:not(.noshiftselect)' ).checkboxShiftClick();
- /* Add accesskey hints to the tooltips */
- mw.util.updateTooltipAccessKeys();
+ /* Add accesskey hints to the tooltips */
+ mw.util.updateTooltipAccessKeys();
-} );
+ } );
+}( mediaWiki, jQuery ) );