From 1cb22c45f5817f2012b03bd43c8413aa7bb5bc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Thu, 18 Feb 2016 16:48:35 +0000 Subject: [PATCH] main: sort links by tq --- lib/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/main.js b/lib/main.js index 53953a9..acfbd58 100644 --- a/lib/main.js +++ b/lib/main.js @@ -108,6 +108,10 @@ function (moment, Router, L, GUI, numeral) { } }) + links.sort( function (a, b) { + return a.tq - b.tq + }) + return { now: now, timestamp: moment.utc(dataNodes.timestamp).local(), nodes: {