User:Gamedezyner/API/Plugins/markForStandards.js

//Mark for Standards plugin for API //Designed for use on w:c:sonicfanon api.functions.markForStandards = 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 doesn't this page meet Standards?","Insufficient Content"); api.functions.prependText(wgPageName,'','SFWBOT (' + usergroup + ' user): Marking page for standards violation - ' + reason); window.location.reload; } } allowedNamespaces = [0, 1, 2, 3, 4, 5, 112, 113]; if (allowedNamespaces.indexOf(wgNamespaceNumber)>-1) { api.menu.add("markForStandards", "Mark for Standards"); $("#markForStandards").click(api.functions.markForStandards); }