check IPv4/IPv6 (#56)

This commit is contained in:
Daniel Krah 2016-07-23 16:52:49 +02:00 committed by PetaByteBoy // Milan Pässler
parent cfd778dadb
commit 07d5e3f636

View file

@ -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