User:Ohconfucius/script/MOSNUM dates.js: Difference between revisions

Content deleted Content added
disable easter egg removal per request
copied fix thanks to User:DavidBrooks
Line 832:
var dflagfound = editor.get().search(rxpdd);
if (dflagfound === -1) {
editor.prepend("{{Use " + format + " dates|date=" + curryyyymm + "}}\r\n"); // not found so insert new template at top of wikitext
.replace(/(\{\{[\t_ ]*use[\t_ ]+(?:dmy|mdy)[\t_ ]+dates[^{}]*\}\})([\r\n\t ]*)(\{\{[\t ]*short description[^{}]*\}\})/gi, "$3$2$1"); // repositioning "short description" template at the top
return; // and done
}