diff --git a/public_html/index.html b/public_html/index.html index ad56ad2..9d58a5a 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -216,6 +216,7 @@
+
@@ -232,14 +233,14 @@
- +
- +
diff --git a/public_html/script.js b/public_html/script.js index 935285a..fd22025 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -16,6 +16,7 @@ var HighlightedPlane = null; var FollowSelected = false; var infoBoxOriginalPosition = {}; var customAltitudeColors = true; +var myAdsbStatsSiteUrl = null; var SpecialSquawks = { '7500' : { cssClass: 'squawk7500', markerColor: 'rgb(255, 85, 85)', text: 'Aircraft Hijacking' }, @@ -217,6 +218,8 @@ function initialize() { flightFeederCheck(); + setStatsLink(); + PlaneRowTemplate = document.getElementById("plane_row_template"); refreshClock(); @@ -401,6 +404,12 @@ function initialize() { $('#filter_panel').toggle(); }); + $('#stats_page_button').on('click', function() { + if (myAdsbStatsSiteUrl) { + window.open(myAdsbStatsSiteUrl); + } + }); + // Event handlers for to column checkboxes checkbox_div_map.forEach(function (checkbox, div) { $(div).on('click', function() { @@ -2234,6 +2243,17 @@ function flightFeederCheck() { }) } +function setStatsLink() { + $.ajax('/status.json', { + success: function(data) { + if (data.site_url) { + myAdsbStatsSiteUrl = data.site_url; + console.log(myAdsbStatsSiteUrl) + } + } + }) +} + // updates the page to replace piaware with flightfeeder references function updatePiAwareOrFlightFeeder() { if (isFlightFeeder) { diff --git a/public_html/style.css b/public_html/style.css index 3782ca7..84d7fe1 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -851,7 +851,7 @@ select.error, textarea.error, input.error { color: #002F5D; cursor: pointer; text-align: center; - width: 125px; + width: auto; } .config_button:hover, .config_button_active {