Difference between revisions of "MediaWiki:Common.js"

From Terminals
Jump to: navigation, search
m (auto minor edit)
(No difference)

Revision as of 10:11, 25 March 2012

/* Any JavaScript here will be loaded for all users on every page load. */

/**
 * Automatically tick the minor edit check box
 *
 * @source: http://www.mediawiki.org/wiki/Snippets/Mark_minor_edit
 * @rev: 2
 */
jQuery( document ).ready( function( $ ) {
        if( mw.config.get( 'wgAction' ) === 'edit' ) {
                document.getElementById( 'wpMinoredit' ).checked = true;
        }
} );