User:Void/quickDel.js

// // Quickly written script designed to delete pages equally as quickly.

var delLink = mw.util.addPortletLink(   'p-cactions',    '#',    'Delete Spam',    'pt-spamlink',    'Delete the current spam' );

delLink.click( function {	var confirmDel = confirm("Do you really want to delete this page?");	if( confirmDel )		deletePage; });

function deletePage { var pageTitle = mw.config.get( 'wgPageName' ); $.ajax( {       url: mw.util.wikiScript( 'api' ),        type: 'POST',        dataType: 'json',        data: {            format: 'json',            action: 'delete',            title: pageTitle,            reason: 'Spam (CVT action)',            token: mw.user.tokens.get( 'csrfToken' ),        }    } ).done(console.log( "Deleted spam page: " + pageTitle )    ).fail( function ( e, data ) {    	console.log( e.message );    	console.log( JSON.stringify( data ) );    }); }

//