User:Technical 13/SandBox/forceSummary.js

( function ( mw, $ ) {	if ( mw.user.options.get( 'forceeditsummary' ) === '1' ) {		$( 'input#wpSave' ).click( function ( e ) {console.warn( 'clicked save page' ); e.preventDefault;console.warn( 'prevented default' ); $( function {				if ( $( '#wpSummary' ).val === '' ) {console.warn( 'summary empty' );					var saveAnyway = confirm( 'Save without edit summary?' );					if ( saveAnyway ) {console.warn( 'saveAnyway was true, saving' );						$( '#editform' ).submit;					} else {console.warn( 'saveAnyway was false, returning' );						return false;					}				} else {console.warn( 'summary not empty, saving' );					$( '#editform' ).submit;				}			} ); $( '#wpSummary' ).focus; } );	} } ( mediaWiki, jQuery ) );