User:MiG/vector.js

/**	https://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29/Archive_78#Preference_to_mark_all_edits_minor_by_default_asked_to_be_removed_in_bugzilla:24313 /** * 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;	} } );

/* minorEditNamespaces = ['Main', 2]; /**   CUSTOM MINOR EDITS Description: Force minor edits on whichever namespaces are specificed. Can either use names or numbers, from Namespace. Example: minorEditNamespaces = ['Main', 2]; The above example would set minor edits as default for the "Main" namespace (for Articles) and "2" namespace (ID number for "User"). NOTE: "Wikipedia" namespace is "Project" in this script. /* if (typeof(unsafeWindow) != 'undefined') {   mw = unsafeWindow.mw; } function customMinorEdits {   if (mw.config.get('wgAction') != 'edit' || typeof(minorEditNamespaces) == 'undefined' || minorEditNamespaces.length == 0) return false; var checkbox = $('#wpMinoredit'); if (!checkbox.length) return false; if ($.inArray(mw.config.get('wgCanonicalNamespace'), minorEditNamespaces) != -1 || $.inArray(mw.config.get('wgNamespaceNumber'), minorEditNamespaces) != -1) {       checkbox.attr('checked', true); } } $(document).ready(function {   customMinorEdits; });