User:Glaisher/QuickSpamBlock.js

mw.loader.using( 'oojs-ui' ).done( function {

if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'Block' ) { return; }

$( function {		var button = new OO.ui.ButtonWidget( { label: 'QuickSpam',  flags: 'destructive' } );		button.on( 'click', function  { $( '#mw-input-wpExpiry-other' ).val( 'indefinite' ); $( '#mw-input-wpReason-other' ).val( 'Spamming' ); $( '#mw-input-wpDisableEmail' ).prop( 'checked', true ); $( '#mw-input-wpDisableUTEdit' ).prop( 'checked', true ); } );		$( '#mw-content-text' ).append( button.$element );	} ); } );