Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some minor fixes.

  • Loading branch information...
commit db7a85be50d01165efb0118b426b6fdb158c2d93 1 parent 37ca2e1
@mbostock mbostock authored
Showing with 4 additions and 5 deletions.
  1. +2 −2 heroku/dynamic/gist.html
  2. +2 −3 heroku/dynamic/user.html
View
4 heroku/dynamic/gist.html
@@ -32,8 +32,8 @@ <h1 class="gist-title">Loading…</h1>
var gist = location.pathname.substring(1);
d3.selectAll(".gist-id").text(gist);
-d3.selectAll(".gist-src").attr("src", "/d/" + gist);
-d3.selectAll(".gist-src-href").attr("href", "/d/" + gist);
+d3.selectAll(".gist-src").attr("src", "/d/" + gist + "/");
+d3.selectAll(".gist-src-href").attr("href", "/d/" + gist + "/");
d3.selectAll(".gist-href").attr("href", "https://gist.github.com/" + gist);
d3.json("/" + gist + ".json", function(error, info) {
View
5 heroku/dynamic/user.html
@@ -90,11 +90,10 @@
d3.selectAll(".user-login").text(user);
d3.select(window)
+ .on("load", maybeFetch)
.on("scroll", maybeFetch)
.on("resize", maybeFetch);
-maybeFetch();
-
function maybeFetch() {
if (page >= 0 && d3.select(".loading").node().getBoundingClientRect().top < innerHeight) {
++page;
@@ -137,7 +136,7 @@
d3.select(".gists").selectAll(".gist")
.sort(function(a, b) { return b.id - a.id; });
- maybeFetch();
+ setTimeout(maybeFetch, 50);
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.