User:Gamedezyner/API/Plugins/markForDeletion.js

//Mark for Deletion plugin for API //Designed for use on w:c:sonicfanon api.functions.markForDeletion = 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) { alert("Page has already been marked!"); window.location.reload; } else { reason = prompt("Why should this page be deleted?","SPAM"); api.functions.prependText(wgPageName,'','SFWBOT (' + usergroup + ' user): Marking page for deletion - ' + reason); window.location.reload; } } allowedNamespaces = [0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 112, 113]; if (allowedNamespaces.indexOf(wgNamespaceNumber)>-1) { api.menu.add("markForDeletion", "Mark Page for Deletion"); $("#markForDeletion").click(api.functions.markForDeletion); }