Content deleted Content added
Manishearth (talk | contribs) No edit summary |
Manishearth (talk | contribs) No edit summary |
||
Line 202:
var rVal
if(choice){
if(val.replace(new RegExp("{{orphan}}", "i"), "") != val){
rVal = val.replace(new RegExp("{{orphan}}", "i"), "")
alert(1)
}else if(/{{orphan\|\wdate=[^\}]*}}/i.test(val)){
Line 209:
alert(2)
}else if(val.indexOf("{{articleissues") !=-1){
rVal=val.replace(/\|\w?orphan=[^\|\}]*/i,"")
rVal=rVal.replace(/\|\w?do-attempt=[^\|\}]*/i,"")
alert(4)
}else{
Line 217:
}
}else{
if(val.replace(new RegExp("{{orphan}}", "i"), "") != val){
rVal = val.replace("{{orphan}}", "{{do-attempt|att=\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}}}")
alert(21)
Line 224:
alert(22)
}else if(new RegExp("{{do-attempt|date=[^\|\}]*\|att=[^\|\}]*}}","i").test(val)){
rVal = val.replace(/({{do-attempt|date=[^\|\}]*\|att=)[^\|\}]*}}/i, "$1\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}}}")
}else if(val.indexOf("{{articleissues") !=-1){
rVal=rVal.replace(/\|\w?do-attempt=[^\|\}]*/i,"\|do-attempt=\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}")
alert(23)
}else{
|