sapling/mercurial/templates/monoblue
Anton Shestakov 0e80806e94 hgweb: define locally used variables as actually local in mercurial.js
Variables that are used or assigned without any declaration using var (or let,
or const) are considered global. In many cases this is inadvertent and actually
causes a variable leaking to a broader scope, such as a temporary variable used
inside a loop suddenly being accessible in global scope. (This corresponds to
"undef" option of jshint).

So this patch limits the scope of variables that don't need to be global. There
are a lot of helper variables in Graph.render() used in a loop, I've declared
them all on one line to reduce patch size. "radius" is special because it
wasn't passed to graph.vertex, but was used there (it worked because this
variable leaked to global scope). "window.graph" is created by an inline script
in graph.tmpl so that it can be used in ajaxScrollInit() function, this patch
makes this fact explicit by assigning window.graph to a local variable.
2017-11-22 21:49:36 +08:00
..
bookmarks.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
branches.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
changelog.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
changelogentry.tmpl hgweb: move changeset "tags" to a template in map file (gitweb and monoblue) 2017-11-15 19:36:16 +08:00
changeset.tmpl hgweb: show changeset age in more places (gitweb and monoblue) 2017-11-21 20:28:57 +08:00
error.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
fileannotate.tmpl hgweb: show changeset age in more places (gitweb and monoblue) 2017-11-21 20:28:57 +08:00
filecomparison.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
filediff.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
filelog.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
filerevision.tmpl hgweb: show changeset age in more places (gitweb and monoblue) 2017-11-21 20:28:57 +08:00
footer.tmpl hgweb: call process_dates() via DOM event listener 2017-01-10 20:47:48 -08:00
graph.tmpl hgweb: define locally used variables as actually local in mercurial.js 2017-11-22 21:49:36 +08:00
header.tmpl hgweb: urlescape all urls, HTML escape repo/tag/branch/... names 2013-02-01 20:43:35 +01:00
help.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
helptopics.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
index.tmpl hgweb: call process_dates() via DOM event listener 2017-01-10 20:47:48 -08:00
manifest.tmpl hgweb: move changeset "tags" to a template in map file (gitweb and monoblue) 2017-11-15 19:36:16 +08:00
map hgweb: rename the main attribute of instabilities 2017-11-26 13:29:18 +08:00
notfound.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
search.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
shortlog.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00
summary.tmpl hgweb: show changeset age in more places (gitweb and monoblue) 2017-11-21 20:28:57 +08:00
tags.tmpl hgweb: consolidate search form for monoblue 2017-06-09 13:41:10 -07:00