[PATCH] downloads: initialize downloader from sources.js earlier
Kevin Bullock
kbullock+mercurial at ringworld.org
Mon May 15 02:48:11 UTC 2017
# HG changeset patch
# User Kevin Bullock <kbullock+mercurial at ringworld.org>
# Date 1494816447 18000
# Sun May 14 21:47:27 2017 -0500
# Node ID 4b88b3c4fc807a3d1e9a98b670e2f710796e73c1
# Parent c65b81353b8f9e370dc329e0a7ba1c2441d215a8
downloads: initialize downloader from sources.js earlier
c65b81353b8f inadvertently broke the /downloads page by moving the call
to Downloader.init(sources) later in the rendering process, after the
downloads list has already been written. As a stopgap, we introduce an
earlier call to initialize the versions before attempting to render the
list. Future changes will move this inline script into an onload
function.
diff --git a/templates/downloads/index.html b/templates/downloads/index.html
--- a/templates/downloads/index.html
+++ b/templates/downloads/index.html
@@ -4,6 +4,7 @@
<h1>Mercurial downloads</h1>
<script language="javascript">
+ Downloader.init(sources);
var versions = Downloader.versions();
var more = Downloader.maxversions &&
versions.length > Downloader.maxversions;
More information about the Mercurial-devel
mailing list