# HG changeset patch # User Anton Shestakov # Date 2015-10-24 08:47:33 # Node ID ad443e8d9334687ed004b363b701ca320a19e829 # Parent 0f75461a9698d6021a15e278fb68f0a27784dba7 hgweb: remove unused colorPart() from mercurial.js Looks like the function wasn't ever used since its introduction in 0dba955c2636, since setColor() below always used "rgb(255, 255, 255)" notation which doesn't need hex digits. 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 @@ -50,18 +50,6 @@ function Graph() { this.cell_height = this.box_size; } - function colorPart(num) { - num *= 255 - num = num < 0 ? 0 : num; - num = num > 255 ? 255 : num; - var digits = Math.round(num).toString(16); - if (num < 16) { - return '0' + digits; - } else { - return digits; - } - } - this.setColor = function(color, bg, fg) { // Set the colour.