Content deleted Content added
debug |
var SearchRegexes should add to, not replace, the default values. |
||
(2 intermediate revisions by the same user not shown) | |||
Line 20:
}
var SearchRegexes =
"^(\\\{\\\{#invoke|[Mm][Dd]):":"Module:",
"^(\\\{\\\{|[Tt][Pp]:)":"Template:",
"\\\}\\\}$":"",
...SearchRegexes
};
function replaceBracesInSearch(box) {
for (var search in SearchRegexes) {
Line 26 ⟶ 31:
if(re.test(box.value)) {
box.value=box.value.replace(re,SearchRegexes[search]);
box.dispatchEvent(new Event('input'));
}
}
|