User:Leaderboard/quickdelete.js

// // from User:Acagastya/FUR.js var tagspam = { tag: function { var inPut = prompt("Deletion reason:", "spam"); if(!inPut) return; var api = new mw.Api; api.postWithToken("edit", {				action: 'edit',				title: mw.config.get ('wgPageName'),				prependtext: '',				summary: 'delete'			}).done(function (data){		   	api.get( { action: 'parse', page: mw.config.get( 'wgPageName' ), prop: 'text' } ).done( function ( data ) { console.log('got html'); text = data.parse.text['*']; $('.mw-parser-output').replaceWith(text); $('#tagspam').fadeOut; });			});	},	init: function { var t = document.getElementById('t-whatlinkshere'); if (!t) return; var li = document.createElement('li'); var a = document.createElement('a'); a.setAttribute('href', 'javascript:tagspam.tag'); a.setAttribute('accesskey', 'o'); a.id = 'tagspam'; a.appendChild(document.createTextNode('speedy delete')); li.appendChild(a); t.parentNode.appendChild(li); } };

mw.loader.using(['mediawiki.api'], function {

tagspam.init; });

//