Snippets/Tick "Ignore any warnings" automatically

From MediaWiki.org
Jump to navigation Jump to search
How to use Snippets
List of Snippets
Crystal Clear action run.png
Tick "Ignore any warnings" automatically
Language(s): JavaScript
Compatible with: MediaWiki 1.20+ 

Description[edit]

Adding this snippet to MediaWiki:UploadForm.js will tick the Ignore any warnings on Special:Upload automatically, if the user's browser has JavaScript enabled.

Code[edit]

/**
 * Tick "Ignore any warnings" on Special:Upload automatically
 *
 * @author Florian Schmidt
 */
( function( $ ) {
    $( '#wpIgnoreWarning' ).prop( 'checked', true );
}( jQuery ) );