Difference between revisions of "MediaWiki:Common.js"

From Terminals
Jump to: navigation, search
m (Log mw)
m (Log mw)
Line 13: Line 13:
 
} );
 
} );
  
console.log( JSON.stringify(mw, null, 4 ));
+
console.log( JSON.stringify( Object.Keys(mw), null, 4 ));

Revision as of 04:46, 25 November 2018

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

console.log( JSON.stringify( Object.Keys(mw), null, 4 ));