Jump to content

Snippets/Mark minor edit

From mediawiki.org
How to use Snippets
List of Snippets
Mark minor edit
Language(s): JavaScript
Compatible with: MediaWiki 1.17+ (Vector; Monobook)

Description

[edit]

Automatically ticks the minor edit checkbox when editing

Code

[edit]
/**
 * Automatically tick the minor edit check box
 *
 * @source: https://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]