Skip to content

Commit 9908615

Browse files
author
xss
committed
fix receiver popup
1 parent 1e52359 commit 9908615

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

js/tracker.js

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4388,8 +4388,58 @@ function updateReceivers(r, single) {
43884388
receiver.lon = lon;
43894389
receiver.alt = alt;
43904390
receiver.age = age.toISOString();
4391-
receiver.description = "<font style='font-size: 13px'>"+receiver.name+"</font><br/><font size='-2'><BR><B>Radio: </B>" + last.software_name + "-" + last.software_version
4392-
+ "<BR><B>Antenna: </B>" + last.uploader_antenna + "<BR><B>Last Contact: </B>" + last.ts + "Z<BR></font>";
4391+
4392+
var receiver_description_html = document.createElement("p")
4393+
var receiver_name = document.createElement("font")
4394+
receiver_name.style.fontSize = "13px"
4395+
receiver_name.textContent = receiver.name
4396+
receiver_description_html.appendChild(receiver_name)
4397+
receiver_description_html.appendChild(document.createElement("br"))
4398+
4399+
var subSection = document.createElement("font")
4400+
subSection.style.fontSize = "-2"
4401+
var radioSoftware = document.createElement("b")
4402+
radioSoftware.textContent = "Software: "
4403+
subSection.appendChild(radioSoftware)
4404+
4405+
var receiverSoftware = document.createTextNode(last.software_name + "-" + last.software_version)
4406+
subSection.appendChild(receiverSoftware)
4407+
4408+
subSection.appendChild(document.createElement("br"))
4409+
4410+
if (last.uploader_radio){
4411+
var radioHeading = document.createElement("b")
4412+
radioHeading.textContent = "Radio: "
4413+
subSection.appendChild(radioHeading)
4414+
4415+
var uploaderRadio = document.createTextNode(last.uploader_radio)
4416+
subSection.appendChild(uploaderRadio)
4417+
4418+
subSection.appendChild(document.createElement("br"))
4419+
}
4420+
4421+
4422+
if (last.uploader_antenna){
4423+
var antennaHeading = document.createElement("b")
4424+
antennaHeading.textContent = "Antenna: "
4425+
subSection.appendChild(antennaHeading)
4426+
4427+
var uploaderAntenna = document.createTextNode(last.uploader_antenna)
4428+
subSection.appendChild(uploaderAntenna)
4429+
4430+
subSection.appendChild(document.createElement("br"))
4431+
}
4432+
4433+
var lastContactHeading = document.createElement("b")
4434+
lastContactHeading.textContent = "Last Contact: "
4435+
subSection.appendChild(lastContactHeading)
4436+
4437+
var lastContact = document.createTextNode(last.ts + "Z")
4438+
subSection.appendChild(lastContact)
4439+
4440+
receiver_description_html.appendChild(subSection)
4441+
4442+
receiver.description = receiver_description_html.innerHTML;
43934443
receiver.fresh = true;
43944444

43954445
updateReceiverMarker(receiver);

0 commit comments

Comments
 (0)