diff --git a/html/index.html b/html/index.html
index b52bdb4..370ba5e 100644
--- a/html/index.html
+++ b/html/index.html
@@ -827,7 +827,7 @@
+
+
+
diff --git a/html/planeObject.js b/html/planeObject.js
index 823134e..264713c 100644
--- a/html/planeObject.js
+++ b/html/planeObject.js
@@ -184,6 +184,10 @@ PlaneObject.prototype.isFiltered = function() {
if (!filterTracks && this.altFiltered(this.altitude))
return true;
+ if (PlaneFilter.icao && !this.icao.match(PlaneFilter.icao) ) {
+ return true;
+ }
+
if (PlaneFilter.type && (!this.icaoType || !this.icaoType.match(PlaneFilter.type)) ) {
return true;
}
@@ -2023,8 +2027,8 @@ PlaneObject.prototype.milRange = function() {
//400000-40003f = united kingdom mil_1(ra)
|| this.icao.match(/^4000[0-3]/)
- //43c000-43ffff = united kingdom mil(ra)
- || this.icao.match(/^43[c-f]/)
+ //43c000-43cfff = united kingdom mil(ra)
+ || this.icao.match(/^43c/)
//444000-447fff = austria mil(aq)
|| (this.icao.match(/^44[4-7]/) && this.icao != '447ac7')
diff --git a/html/script.js b/html/script.js
index ad16607..b82fbac 100644
--- a/html/script.js
+++ b/html/script.js
@@ -857,6 +857,7 @@ function init_page() {
$("#callsign_filter_form").submit(updateCallsignFilter);
$("#type_filter_form").submit(updateTypeFilter);
$("#description_filter_form").submit(updateDescriptionFilter);
+ $("#icao_filter_form").submit(updateIcaoFilter);
$("#search_form").submit(onSearch);
$("#jump_form").submit(onJump);
@@ -873,6 +874,7 @@ function init_page() {
$("#callsign_filter_reset_button").click(onResetCallsignFilter);
$("#type_filter_reset_button").click(onResetTypeFilter);
$("#description_filter_reset_button").click(onResetDescriptionFilter);
+ $("#icao_filter_reset_button").click(onResetIcaoFilter);
// check if the altitude color values are default to enable the altitude filter
if (ColorByAlt.air.h.length === 3 && ColorByAlt.air.h[0].alt === 2000 && ColorByAlt.air.h[0].val === 20 && ColorByAlt.air.h[1].alt === 10000 && ColorByAlt.air.h[1].val === 140 && ColorByAlt.air.h[2].alt === 40000 && ColorByAlt.air.h[2].val === 300) {
@@ -3206,6 +3208,25 @@ function updateTypeFilter(e) {
refreshHighlighted();
refreshTableInfo();
}
+function onResetIcaoFilter(e) {
+ $("#icao_filter").val("");
+ $("#icao_filter").blur();
+
+ updateIcaoFilter();
+}
+function updateIcaoFilter(e) {
+ if (e)
+ e.preventDefault();
+
+ $("#icao_filter").blur();
+ let icao = $("#icao_filter").val().trim();
+
+ PlaneFilter.icao = icao.toLowerCase();
+
+ refreshSelected();
+ refreshHighlighted();
+ refreshTableInfo();
+}
function onResetDescriptionFilter(e) {
$("#description_filter").val("");