User:Manishearth/orphantabs.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 218:
}else{
if(val.replace("{{orphan}}", "") != val){
rVal = val.replace("{{orphan}}", "{{do-attempt|att=November\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}}}")
alert(21)
}else if(new RegExp("{{orphan|date=[^\}]}}","i").test(val)){
rVal = val.replace(/{{orphan\|date=([^\}]*)}}/i, "{{do-attempt|date=$1|att=November\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}}}")
alert(22)
}else if(new RegExp("{{do-attempt|date=[^\|\}]*\|att=[^\|\}]*}}","i").test(val)){
rVal = val.replace(/({{do-attempt|date=[^\|\}]*\|att=)[^\|\}]*}}/, "$1November1\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}}}")
 
}else if(val.indexOf("{{articleissues") !=-1){
rVal=rVal.replace(/\|\w?do-attempt=[^\|\}]*/,"\|do-attempt=November\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}")
alert(23)
}else{
rVal= "{{do-attempt|att=\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}" + val
rVal= val
}
}