User:Gamedezyner/API/Plugins/quickDelete.js

// //Mark for Deletion plugin for API //Designed for use on w:c:sonicfanon api.functions.quickDelete = function { if (wgUserGroups.indexOf("sysop")>-1 || wgUserGroups.indexOf("bureaucrat")>-1) { usergroup = "Admin"; } else { usergroup = "Cleanup"; } current = api.functions.getPageContents(wgPageName); if (current.match(/]+}}/ig) != null) { reason = "Marked for deletion" api.functions.deletePage(wgPageName,'SFWBOT (' + usergroup + ' user): Quick Deleting page - ' + reason); window.location.reload; } else { reason = prompt("Why should this page be deleted?","SPAM"); if (reason != null) { api.functions.deletePage(wgPageName,'SFWBOT (' + usergroup + ' user): Quick Deleting page - ' + reason); window.location.reload; } } }

api.menu.add("quickDelete", "Quick Delete"); $("#quickDelete").click(api.functions.quickDelete); //