User:N7/monobook.js

function AddSpeedyButtons { var speedyoptions = { 'None': 'None', 'Spam/Nonsense': 'Spam', 'Vandalism': 'Vand', 'Successful AfD': 'AfD', 'Unnecessary': 'NtNd', 'Leaked information': 'Leak' };    var speedyoptstr = ''; for(i in speedyoptions) {speedyoptstr += '' + speedyoptions[i] + ' ';} var html = '' + speedyoptstr + ' Delete (Speedy)' $('#p-cactions .pBody ul').append(html); document.getElementById('ca-speedy-button').onclick = function(event) { if(document.getElementById('ca-speedy').options[document.getElementById('ca-speedy').selectedIndex].innerHTML != "None") { api.send(new api.Query(api, 'POST', 'action=delete&title=' + wgPageName + '&reason=' + document.getElementById('ca-speedy').options[document.getElementById('ca-speedy').selectedIndex].value, function(result) { window.location = wgServer + '/index.php?title=' + wgPageName + '&action=purge'; }));}         else{alert('Please select a delete reason.')}; } }	addOnloadHook(AddSpeedyButtons); importScriptPage('MediaWiki:APIQuery.js', 'monchbox');

if(window.location.href.indexOf('/wiki/Special:Chat') != -1 || window.location.href.indexOf('/index.php?title=Special:Chat') != -1 || window.location.href.indexOf('/wiki/Special%3AChat') != -1) {window.location.href += '?useskin=wikia';}