From c7334d99b86d21e7d02bfd18a9d70eecc841b892 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Thu, 1 Apr 2021 22:15:39 +0200 Subject: [PATCH] for numeric registrations shorter than 5 digits only query by hex --- html/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/script.js b/html/script.js index f6993fc..5afd40d 100644 --- a/html/script.js +++ b/html/script.js @@ -2144,7 +2144,7 @@ function refreshPhoto(selected) { } let urlTail; let param; - if (selected.registration != null) { + if (selected.registration != null && !(selected.registration.length <= 4 && selected.registration.match(/^[0-9]*$/))) { urlTail = '/hex/' + selected.icao.toUpperCase() + '?reg=' + selected.registration; if (selected.icaoType) { urlTail += '&icaoType=' + selected.icaoType;