Snippets/Mark minor edit

From MediaWiki.org
Jump to: navigation, search
How to use Snippets
List of Snippets
Crystal Clear action run.png
Mark minor edit
Language(s): javascript
Compatible with:

MediaWiki 1.17+ (Vector; Monobook)

Description[edit | edit source]

Automatically ticks the minor edit checkbox when editing

Code[edit | edit source]

/**
 * 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;
        }
} );

Notes[edit | edit source]