Fix MessageRate might be null and remove unused config (#71)

* Fix MessageRate might be null && unused config

* Page title edits

Co-authored-by: Eric Tran <eric1tran@gmail.com>
This commit is contained in:
Assaf Sapir 2020-08-09 02:26:57 +03:00 committed by GitHub
parent a0b0038df7
commit d353568c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -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;

View File

@ -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;