User:Ultraexactzz/afdsort.js

//  function afdsort { var f = document.editform, t = f.wpTextbox1; t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); t.value=t.value.split("\r\n").join(""); var cat = prompt("Enter Category code", ""); if(t.value.split("===").length>=3) {   var a=t.value.split("==="); a[2]="\n" + "" + a[2]; t.value=a.join("==="); }   f.wpSummary.value = "Sorting per CAT:AFD using AFDsort"; f.submit; } addOnloadHook( function addafdsortlink {  if (document.title.indexOf("Editing Wikipedia:Articles for deletion") == 0)  {    mw.util.addPortletLink("p-cactions", "javascript:afdsort", "Sort", "", "", "", "");  } } ); //