Content deleted Content added
Manishearth (talk | contribs) No edit summary |
Manishearth (talk | contribs) No edit summary |
||
Line 40:
//alert("dowing")
document.editform.wpTextbox1.value = orphanRawWikify(pgName,document.editform.wpTextbox1.value)
document.editform.wpSummary.value = "
}
function orphanRawWikify(pgName,text){
Line 162:
function addOrphanTag(choice){
var
if(choice){
editSum = "Successfully de-orphaned! Wikiproject Orphanage: [[WP:ORPHAN|You can help!]]"
}else{
editSum = "Unsuccesful de-orphan attempt, Wikiproject Orphanage: [[WP:ORPHAN|You can help!]]"
}
currentLinkWin.editform.wpSummary.value=editSum
currentLinkWin.close()
alert("De-orphaning over!!!")
}
Line 191 ⟶ 198:
}
}
function addOrphanTagRaw(choice, val){
var rVal
if(choice){
if(val.replace("{{orphan}}", "") != val){
rVal = val.replace("{{orphan}}", "")
alert(1)
}else if(/{{orphan\|\wdate=[^\}]*}}/i.test(val)){
rVal = val.replace(/{{orphan\|\wdate=[^\}]*}}/i, "")
alert(2)
}else if(val.indexOf("{{articleissues") !=-1){
rVal=val.replace(/\|\w?orphan=[^\|\}]*/,"")
rVal=rVal.replace(/\|\w?do-attempt=[^\|\}]*/,"")
alert(4)
}else{
rVal=val
alert(5)
}
}else{
if(val.replace("{{orphan}}", "") != val){
rVal = val.replace("{{orphan}}", "{{do-attempt|att=November}}")
alert(21)
}else if(new RegExp("{{orphan|date=[^\}]}}","i").test(val)){
rVal = val.replace(/{{orphan\|date=([^\}]*)}}/i, "{{do-attempt|date=$1|att=November}}")
alert(22)
}else if(new RegExp("{{do-attempt|date=[^\|\}]*\|att=[^\|\}]*}}","i").test(val)){
rVal = val.replace(/({{do-attempt|date=[^\|\}]*\|att=)[^\|\}]*}}/, "$1November}}")
}else if(val.indexOf("{{articleissues") !=-1){
rVal=rVal.replace(/\|\w?do-attempt=[^\|\}]*/,"\|do-attempt=November")
alert(23)
}else{
rVal= val
}
}
return rVal
}
|