# HG changeset patch # User Anton Shestakov # Date 2018-01-05 11:30:30 # Node ID 8b958d21b19d659f3d8d802b327cec58095f8e7a # Parent bb5a03dfd7ff16ab1df784a5cd26669463e5cb4f hgweb: stop adding strings to innerHTML of #graphnodes and #nodebgs (BC) There's nothing that uses this functionality anymore, since all HTML is generated server-side now. Changeset entries are still accessible in JS via DOM (that's how we set left padding), so it's still possible to do something unusual by overriding Graph.prototype.vertex(). diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js --- a/mercurial/templates/static/mercurial.js +++ b/mercurial/templates/static/mercurial.js @@ -40,7 +40,6 @@ Graph.prototype = { this.bg = [0, 4]; this.cell = [2, 0]; this.columns = 0; - document.getElementById('nodebgs').innerHTML = ''; }, scale: function(height) { @@ -102,14 +101,10 @@ Graph.prototype = { if (item) { item.style.paddingLeft = left + 'px'; } - - return ['', '']; }, render: function(data) { - var backgrounds = ''; - var nodedata = ''; var i, j, cur, line, start, end, color, x, y, x0, y0, x1, y1, column, radius; var cols = 0; @@ -172,17 +167,12 @@ Graph.prototype = { radius = this.box_size / 8; x = this.cell[0] + this.box_size * column + this.box_size / 2; y = this.bg[1] - this.bg_height / 2; - var add = this.vertex(x, y, radius, color, parity, cur); - backgrounds += add[0]; - nodedata += add[1]; + this.vertex(x, y, radius, color, parity, cur); if (fold) this.columns -= 1; } - document.getElementById('nodebgs').innerHTML += backgrounds; - document.getElementById('graphnodes').innerHTML += nodedata; - } };