From 07d5e3f636615758d64d3a3ffa202de5298ac0aa Mon Sep 17 00:00:00 2001 From: Daniel Krah Date: Sat, 23 Jul 2016 16:52:49 +0200 Subject: [PATCH] check IPv4/IPv6 (#56) --- lib/infobox/node.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index 668019e..3130365 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -160,7 +160,10 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], if (link) { var a = document.createElement("a") - a.href = "http://[" + ip + "]/" + if (ip.includes(".")) + a.href = "http://" + ip + "/" + else + a.href = "http://[" + ip + "]/" a.textContent = ip el.appendChild(a) } else