User:Pxma/rfacloser.js

// User:PxMa/rfacloser.js importScript("User:PxMa/simpleajax.js"); importScript("User:Azatoth/morebits.js");

function rfahelperload{ if(wgTitle.indexOf("Requests for adminship") == -1){ return; } mw.util.addPortletLink("p-cactions", "javascript:rfahelper('archive')", "archive", "ca-archive", "archive", ""); } $(rfahelperload); if (type == "close"){ var params = window.prompt("unsuccessful/successful"); if(params == null){ params = ""; }else{ params = " " + params; } if(type == "denied"){ var params = window.prompt("v/bio/nn/web/corp/music/dict/context/blank/neo/joke/lang/blp/npov/not"); if(params == null){ params = ""; }else{ params = " " + params; } var tag = "{" + "{" + "subst:afc"+params+"}}"; simpleAJAXPrepend(wgPageName, ":"+tag+" "+""+"\n", "Article denied", false, true, " Editing... ", " Saved! ", false); } if(type == "archive"){ var result = window.prompt("p/f/h", "Archiving"); simpleAJAXAppendPrepend(wgPageName, "{"+"{"+"subst:rfa"+result+"}}", "{"+"{"+"subst:rfab}}", "Archiving", false, false, " Archiving... ", " Archived, reloading... ", true); } }