Skip to content

Commit

Permalink
Fix MessageRate might be null and remove unused config (MalcolmRobb#71)
Browse files Browse the repository at this point in the history
* Fix MessageRate might be null && unused config

* Page title edits

Co-authored-by: Eric Tran <eric1tran@gmail.com>
  • Loading branch information
Assaf Sapir and eric1tran committed Aug 8, 2020
1 parent a0b0038 commit d353568
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion public_html/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ OutlineMlatColor = '#4040FF';

SiteCircles = true; // true to show circles (only shown if the center marker is shown)
// In miles, nautical miles, or km (depending settings value 'DisplayUnits')
SiteCirclesDistances = new Array(100,150,200);
DefaultSiteCirclesCount = 3;
DefaultSiteCirclesBaseDistance = 100;
DefaultSiteCirclesInterval = 50;
Expand Down
11 changes: 7 additions & 4 deletions public_html/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,12 +1043,15 @@ function refreshPageTitle() {
var subtitle = "";

if (PlaneCountInTitle) {
subtitle += TrackedAircraftPositions + '/' + TrackedAircraft;
subtitle += 'Tracking ' + TrackedAircraft + ' Aircraft';
}

if (MessageRateInTitle) {
if (subtitle) subtitle += ' | ';
subtitle += MessageRate.toFixed(1) + '/s';
if (MessageRateInTitle && MessageRate) {
if (subtitle) {
subtitle += ' | ';
}

subtitle += MessageRate.toFixed(1) + ' msg/sec';
}

document.title = PageName + ' - ' + subtitle;
Expand Down

0 comments on commit d353568

Please sign in to comment.