User:Zzuuzz/scripts/spamblacklistblock.js

if ( 'Log' === mw.config.get( 'wgCanonicalSpecialPageName' ) ) { mw.hook("wikipage.content").add(function 	{		$("li[data-mw-logaction='spamblacklist/hit'] a.mw-usertoollinks-block").each(function(ind, el) {			var user = $(el).attr('href').match(/^\/wiki\/Special:Block\/(.+)$/); if(user !== null) {				var link = mw.config.get( 'wgServer' ) + mw.config.get( 'wgScript' ) + '?title=Special:Block/' + user[1] + '&wpExpiry=other' + '&wpExpiry-other=never' + '&wpReason=other' + '&wpReason-other=Spammer %3C%21--%20sbl%20--%3E' + '&wpCreateAccount=1' + '&wpDisableUTEdit=1'; $(el).html('spamblock'); $(el).attr('href', link); }		});	}); }