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,6 +160,9 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
if (link) {
var a = document.createElement("a")
if (ip.includes("."))
a.href = "http://" + ip + "/"
else
a.href = "http://[" + ip + "]/"
a.textContent = ip
el.appendChild(a)