From 7500cabb0819f66bc6a1b45ffcb88804810394bf Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 22 Jan 2015 13:21:47 +0000 Subject: [PATCH] Show rows with non-ICAO addresses in italic. --- public_html/script.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public_html/script.js b/public_html/script.js index aef1769..294ab13 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -71,7 +71,14 @@ function processReceiverUpdate(data) { } else { plane = new PlaneObject(hex); plane.tr = PlaneRowTemplate.cloneNode(true); - plane.tr.cells[0].textContent = hex; // this won't change + if (hex[0] === '~') { + // Non-ICAO address + plane.tr.cells[0].textContent = hex.substring(1); + plane.tr.css('font-style', 'italic'); + } else { + plane.tr.cells[0].textContent = hex; + } + plane.tr.addEventListener('click', selectPlaneByHex.bind(undefined,hex)); Planes[hex] = plane;