MediaWiki:Vector.js

/* Any JavaScript here will be loaded for users using the Vector skin */

function deleteLogEntry( entryID, delLogReason ) { var reasonDelLog = 'Vandalism only account. Removing '; switch ( delLogReason ) { case 'phone' : reasonDelLog += 'possible phone number '; case 'long' : reasonDelLog += 'long page name '; default : reasonDelLog += 'plausible '; }   reasonDelLog += 'RC spam with DeSpammer.'; ( new mw.Api ).postWithToken( 'delete', {     action: 'revisiondelete',      type: 'logging',      ids: entryID,      hide: 'content',      reason: reasonDelLog    } ).done( function( rdResult ) {      console.log( '%o', rdResult );      $( 'a#logID-' + entryID ).text( 'log cleaned' ).removeAttr( 'onclick' ).removeAttr( 'style' ).removeAttr( 'title' );// Might change this later so the onclick takes you to the log entry to review it.    } ); }