author | Alexander Plavin <alexander@plav.in> |
Fri, 06 Sep 2013 13:30:57 +0400 | |
changeset 19739 | 5bdc179e58c1 |
parent 19738 | 93b8544c4482 |
child 19740 | 2228bd109706 |
--- a/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:57 2013 +0400 +++ b/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:57 2013 +0400 @@ -298,3 +298,9 @@ setLinewrap(!getLinewrap()); } + +function format(str, replacements) { + return str.replace(/%(\w+)%/g, function(match, p1) { + return String(replacements[p1]); + }); +}