Mercurial > public > mercurial-scm > hg
diff mercurial/templates/static/mercurial.js @ 30765:eb7de21b15be
hgweb: call process_dates() via DOM event listener
All the hgweb templates include mercurial.js in their header. All
the hgweb templates have the same <script> boilerplate to run
process_dates(). This patch factors that function call into
mercurial.js as part of a DOMContentLoaded event listener.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 10 Jan 2017 20:47:48 -0800 |
parents | 1779ff7426c9 |
children | 6797f1fbc642 |
line wrap: on
line diff
--- a/mercurial/templates/static/mercurial.js Sat Dec 24 15:29:32 2016 -0700 +++ b/mercurial/templates/static/mercurial.js Tue Jan 10 20:47:48 2017 -0800 @@ -433,3 +433,7 @@ window.addEventListener('resize', scrollHandler); scrollHandler(); } + +document.addEventListener('DOMContentLoaded', function() { + process_dates(); +}, false);