Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
jQuery( document ).ready( function ( $ ) { | jQuery( document ).ready( function ( $ ) { | ||
'use strict'; | 'use strict'; | ||
− | var | + | var edittools; |
− | if ( $( ' | + | if ( $( '.mw-editTools' ).length ) { |
− | + | edittools = $( '.mw-editTools' )[0]; | |
} else { | } else { | ||
− | |||
− | |||
− | |||
− | |||
return; | return; | ||
} | } | ||
− | $( '.editOptions' ).before( | + | $( '.editOptions' ).before( edittools ); |
}); | }); |
Revision as of 12:20, 6 July 2022
/* Any JavaScript here will be loaded for all users on every page load. */ // Extension:Edittools // We put the edit tools section above the summary box. jQuery( document ).ready( function ( $ ) { 'use strict'; var edittools; if ( $( '.mw-editTools' ).length ) { edittools = $( '.mw-editTools' )[0]; } else { return; } $( '.editOptions' ).before( edittools ); });