kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Merge branch 'pull_acks_gt-org' into 'master'
Pull acks gt org Closes #103 See merge request gridtracker.org/gridtracker!124rich-presence
commit
42490485b9
|
@ -6,8 +6,7 @@ var gtVersion = parseInt(pjson.version.replace(/\./g, ""));
|
||||||
var gtBeta = pjson.betaVersion;
|
var gtBeta = pjson.betaVersion;
|
||||||
|
|
||||||
var g_startVersion = 0;
|
var g_startVersion = 0;
|
||||||
if (typeof localStorage.currentVersion != "undefined")
|
if (typeof localStorage.currentVersion != "undefined") { g_startVersion = localStorage.currentVersion; }
|
||||||
{ g_startVersion = localStorage.currentVersion; }
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof localStorage.currentVersion == "undefined" ||
|
typeof localStorage.currentVersion == "undefined" ||
|
||||||
|
@ -97,7 +96,7 @@ var g_callsignDatabaseUSplus = {
|
||||||
202: true
|
202: true
|
||||||
};
|
};
|
||||||
|
|
||||||
var g_acknowledgedCalls = require("./data/acknowledgements.json");
|
var g_acknowledgedCalls = {};
|
||||||
|
|
||||||
function loadAllSettings()
|
function loadAllSettings()
|
||||||
{
|
{
|
||||||
|
@ -807,8 +806,7 @@ function toggleOffline()
|
||||||
if (g_appSettings.gtShareEnable == true)
|
if (g_appSettings.gtShareEnable == true)
|
||||||
{
|
{
|
||||||
gtFlagButton.style.display = "inline-block";
|
gtFlagButton.style.display = "inline-block";
|
||||||
if (g_appSettings.gtMsgEnable == true)
|
if (g_appSettings.gtMsgEnable == true) { msgButton.style.display = "inline-block"; }
|
||||||
{ msgButton.style.display = "inline-block"; }
|
|
||||||
else msgButton.style.display = "none";
|
else msgButton.style.display = "none";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -883,8 +881,7 @@ function toggleTime()
|
||||||
|
|
||||||
function dateToString(dateTime)
|
function dateToString(dateTime)
|
||||||
{
|
{
|
||||||
if (g_appSettings.useLocalTime == 1)
|
if (g_appSettings.useLocalTime == 1) { return dateTime.toLocaleString().replace(/,/g, ""); }
|
||||||
{ return dateTime.toLocaleString().replace(/,/g, ""); }
|
|
||||||
else return dateTime.toUTCString().replace(/GMT/g, "UTC").replace(/,/g, "");
|
else return dateTime.toUTCString().replace(/GMT/g, "UTC").replace(/,/g, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,8 +947,7 @@ function getWpx(callsign)
|
||||||
{
|
{
|
||||||
if (/\d/.test(callsign.charAt(prefixEnd)))
|
if (/\d/.test(callsign.charAt(prefixEnd)))
|
||||||
{
|
{
|
||||||
while (prefixEnd + 1 != end && /\d/.test(callsign.charAt(prefixEnd + 1)))
|
while (prefixEnd + 1 != end && /\d/.test(callsign.charAt(prefixEnd + 1))) { prefixEnd++; }
|
||||||
{ prefixEnd++; }
|
|
||||||
foundPrefix = true;
|
foundPrefix = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -969,8 +965,7 @@ function setState(details)
|
||||||
{
|
{
|
||||||
var isDigi = details.digital;
|
var isDigi = details.digital;
|
||||||
|
|
||||||
if (details.state.substr(0, 2) != "US")
|
if (details.state.substr(0, 2) != "US") { details.state = "US-" + details.state; }
|
||||||
{ details.state = "US-" + details.state; }
|
|
||||||
|
|
||||||
g_tracker.worked.state[details.state + details.band + details.mode] = true;
|
g_tracker.worked.state[details.state + details.band + details.mode] = true;
|
||||||
g_tracker.worked.state[details.state] = true;
|
g_tracker.worked.state[details.state] = true;
|
||||||
|
@ -1103,8 +1098,7 @@ function addDeDx(
|
||||||
details.grid.length < 6 &&
|
details.grid.length < 6 &&
|
||||||
(details.grid.substr(0, 4) == finalGrid.substr(0, 4) ||
|
(details.grid.substr(0, 4) == finalGrid.substr(0, 4) ||
|
||||||
details.grid.length == 0)
|
details.grid.length == 0)
|
||||||
)
|
) { details.grid = finalGrid; }
|
||||||
{ details.grid = finalGrid; }
|
|
||||||
}
|
}
|
||||||
if (finalRSTsent.length > 0) details.RSTsent = finalRSTsent;
|
if (finalRSTsent.length > 0) details.RSTsent = finalRSTsent;
|
||||||
if (finalRSTrecv.length > 0) details.RSTrecv = finalRSTrecv;
|
if (finalRSTrecv.length > 0) details.RSTrecv = finalRSTrecv;
|
||||||
|
@ -1156,8 +1150,7 @@ function addDeDx(
|
||||||
if (details.dxcc > 0 && details.px == null)
|
if (details.dxcc > 0 && details.px == null)
|
||||||
{
|
{
|
||||||
details.px = getWpx(finalDXcall);
|
details.px = getWpx(finalDXcall);
|
||||||
if (details.px)
|
if (details.px) { details.zone = Number(details.px.charAt(details.px.length - 1)); }
|
||||||
{ details.zone = Number(details.px.charAt(details.px.length - 1)); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -1529,8 +1522,7 @@ function addDeDx(
|
||||||
if (newCallsign.cont == null)
|
if (newCallsign.cont == null)
|
||||||
{
|
{
|
||||||
newCallsign.cont = g_worldGeoData[g_dxccToGeoData[finalDxcc]].continent;
|
newCallsign.cont = g_worldGeoData[g_dxccToGeoData[finalDxcc]].continent;
|
||||||
if (newCallsign.dxcc == 390 && newCallsign.zone == 1)
|
if (newCallsign.dxcc == 390 && newCallsign.zone == 1) { newCallsign.cont = "EU"; }
|
||||||
{ newCallsign.cont = "EU"; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (finalRSTsent != null)
|
if (finalRSTsent != null)
|
||||||
|
@ -1601,8 +1593,7 @@ function addDeDx(
|
||||||
if (
|
if (
|
||||||
finalGrid.length == callsign.grid.length &&
|
finalGrid.length == callsign.grid.length &&
|
||||||
finalGrid != callsign.grid
|
finalGrid != callsign.grid
|
||||||
)
|
) { callsign.grid = finalGrid; }
|
||||||
{ callsign.grid = finalGrid; }
|
|
||||||
if (finalRSTsent != null) callsign.RSTsent = finalRSTsent;
|
if (finalRSTsent != null) callsign.RSTsent = finalRSTsent;
|
||||||
if (finalRSTrecv != null) callsign.RSTrecv = finalRSTrecv;
|
if (finalRSTrecv != null) callsign.RSTrecv = finalRSTrecv;
|
||||||
callsign.vucc_grids = [];
|
callsign.vucc_grids = [];
|
||||||
|
@ -1624,8 +1615,7 @@ function timeoutSetUdpPort()
|
||||||
|
|
||||||
function setUdpPort()
|
function setUdpPort()
|
||||||
{
|
{
|
||||||
if (g_setNewUdpPortTimeoutHandle != null)
|
if (g_setNewUdpPortTimeoutHandle != null) { window.clearTimeout(g_setNewUdpPortTimeoutHandle); }
|
||||||
{ window.clearTimeout(g_setNewUdpPortTimeoutHandle); }
|
|
||||||
lastMsgTimeDiv.innerHTML = "..setting..";
|
lastMsgTimeDiv.innerHTML = "..setting..";
|
||||||
g_setNewUdpPortTimeoutHandle = window.setTimeout(timeoutSetUdpPort, 1000);
|
g_setNewUdpPortTimeoutHandle = window.setTimeout(timeoutSetUdpPort, 1000);
|
||||||
}
|
}
|
||||||
|
@ -1712,8 +1702,7 @@ function changePathWidth()
|
||||||
|
|
||||||
if (width == 0)
|
if (width == 0)
|
||||||
{
|
{
|
||||||
if (typeof g_flightPaths[i].Arrow != "undefined")
|
if (typeof g_flightPaths[i].Arrow != "undefined") { g_layerSources.flight.removeFeature(g_flightPaths[i].Arrow); }
|
||||||
{ g_layerSources.flight.removeFeature(g_flightPaths[i].Arrow); }
|
|
||||||
g_layerSources.flight.removeFeature(g_flightPaths[i]);
|
g_layerSources.flight.removeFeature(g_flightPaths[i]);
|
||||||
delete g_flightPaths[i];
|
delete g_flightPaths[i];
|
||||||
g_flightPaths[i] = null;
|
g_flightPaths[i] = null;
|
||||||
|
@ -2124,8 +2113,7 @@ function createTooltTipTable(toolElement)
|
||||||
added = true;
|
added = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (added == true)
|
if (added == true) { worker = worker.substr(0, worker.length - " / ".length); }
|
||||||
{ worker = worker.substr(0, worker.length - " / ".length); }
|
|
||||||
worker += "</font>)";
|
worker += "</font>)";
|
||||||
}
|
}
|
||||||
if (x + 1 < g_gridToDXCC[toolElement.qth].length) worker += ", ";
|
if (x + 1 < g_gridToDXCC[toolElement.qth].length) worker += ", ";
|
||||||
|
@ -2160,8 +2148,7 @@ function createTooltTipTable(toolElement)
|
||||||
{
|
{
|
||||||
for (var KeyIsCall in g_liveGrids[toolElement.qth].rectangle.liveHash)
|
for (var KeyIsCall in g_liveGrids[toolElement.qth].rectangle.liveHash)
|
||||||
{
|
{
|
||||||
if (KeyIsCall in g_liveCallsigns && g_appSettings.gridViewMode == 3)
|
if (KeyIsCall in g_liveCallsigns && g_appSettings.gridViewMode == 3) { newCallList.push(g_liveCallsigns[KeyIsCall]); }
|
||||||
{ newCallList.push(g_liveCallsigns[KeyIsCall]); }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2179,8 +2166,7 @@ function createTooltTipTable(toolElement)
|
||||||
}
|
}
|
||||||
for (var KeyIsCall in toolElement.liveHash)
|
for (var KeyIsCall in toolElement.liveHash)
|
||||||
{
|
{
|
||||||
if (KeyIsCall in g_liveCallsigns)
|
if (KeyIsCall in g_liveCallsigns) { newCallList.push(g_liveCallsigns[KeyIsCall]); }
|
||||||
{ newCallList.push(g_liveCallsigns[KeyIsCall]); }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newCallList.sort(compareCallsignTime).reverse();
|
newCallList.sort(compareCallsignTime).reverse();
|
||||||
|
@ -2189,15 +2175,11 @@ function createTooltTipTable(toolElement)
|
||||||
var callsign = newCallList[x];
|
var callsign = newCallList[x];
|
||||||
var bgDX = " style='font-weight:bold;color:cyan;' ";
|
var bgDX = " style='font-weight:bold;color:cyan;' ";
|
||||||
var bgDE = " style='font-weight:bold;color:yellow;' ";
|
var bgDE = " style='font-weight:bold;color:yellow;' ";
|
||||||
if (callsign.DXcall == myDEcall)
|
if (callsign.DXcall == myDEcall) { bgDX = " style='background-color:cyan;color:#000;font-weight:bold' "; }
|
||||||
{ bgDX = " style='background-color:cyan;color:#000;font-weight:bold' "; }
|
if (callsign.DEcall == myDEcall) { bgDE = " style='background-color:#FFFF00;color:#000;font-weight:bold' "; }
|
||||||
if (callsign.DEcall == myDEcall)
|
if (typeof callsign.msg == "undefined" || callsign.msg == "") { callsign.msg = "-"; }
|
||||||
{ bgDE = " style='background-color:#FFFF00;color:#000;font-weight:bold' "; }
|
|
||||||
if (typeof callsign.msg == "undefined" || callsign.msg == "")
|
|
||||||
{ callsign.msg = "-"; }
|
|
||||||
var ageString = "";
|
var ageString = "";
|
||||||
if (timeNowSec() - callsign.time < 3601)
|
if (timeNowSec() - callsign.time < 3601) { ageString = (timeNowSec() - callsign.time).toDHMS(); }
|
||||||
{ ageString = (timeNowSec() - callsign.time).toDHMS(); }
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ageString = userTimeString(callsign.time * 1000);
|
ageString = userTimeString(callsign.time * 1000);
|
||||||
|
@ -2215,8 +2197,7 @@ function createTooltTipTable(toolElement)
|
||||||
worker += "<td>" + (callsign.delta > -1 ? callsign.delta : "-") + "</td>";
|
worker += "<td>" + (callsign.delta > -1 ? callsign.delta : "-") + "</td>";
|
||||||
worker += "<td>" + callsign.RSTsent + "</td>";
|
worker += "<td>" + callsign.RSTsent + "</td>";
|
||||||
worker += "<td>" + callsign.RSTrecv + "</td>" + "<td" + bgDX + ">";
|
worker += "<td>" + callsign.RSTrecv + "</td>" + "<td" + bgDX + ">";
|
||||||
if (callsign.DXcall.indexOf("CQ") == 0 || callsign.DXcall == "-")
|
if (callsign.DXcall.indexOf("CQ") == 0 || callsign.DXcall == "-") { worker += callsign.DXcall.formatCallsign(); }
|
||||||
{ worker += callsign.DXcall.formatCallsign(); }
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
worker +=
|
worker +=
|
||||||
|
@ -2318,13 +2299,10 @@ function createTooltTipTableLogbook(toolElement)
|
||||||
var callsign = newCallList[x];
|
var callsign = newCallList[x];
|
||||||
var bgDX = " style='font-weight:bold;color:cyan;' ";
|
var bgDX = " style='font-weight:bold;color:cyan;' ";
|
||||||
var bgDE = " style='font-weight:bold;color:yellow;' ";
|
var bgDE = " style='font-weight:bold;color:yellow;' ";
|
||||||
if (callsign.DXcall == myDEcall)
|
if (callsign.DXcall == myDEcall) { bgDX = " style='background-color:cyan;color:#000;font-weight:bold' "; }
|
||||||
{ bgDX = " style='background-color:cyan;color:#000;font-weight:bold' "; }
|
if (callsign.DEcall == myDEcall) { bgDE = " style='background-color:#FFFF00;color:#000;font-weight:bold' "; }
|
||||||
if (callsign.DEcall == myDEcall)
|
|
||||||
{ bgDE = " style='background-color:#FFFF00;color:#000;font-weight:bold' "; }
|
|
||||||
var ageString = "";
|
var ageString = "";
|
||||||
if (timeNowSec() - callsign.time < 3601)
|
if (timeNowSec() - callsign.time < 3601) { ageString = (timeNowSec() - callsign.time).toDHMS(); }
|
||||||
{ ageString = (timeNowSec() - callsign.time).toDHMS(); }
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ageString = userTimeString(callsign.time * 1000);
|
ageString = userTimeString(callsign.time * 1000);
|
||||||
|
@ -2342,8 +2320,7 @@ function createTooltTipTableLogbook(toolElement)
|
||||||
worker += "<td>" + (callsign.delta > -1 ? callsign.delta : "-") + "</td>";
|
worker += "<td>" + (callsign.delta > -1 ? callsign.delta : "-") + "</td>";
|
||||||
worker += "<td>" + callsign.RSTsent + "</td>";
|
worker += "<td>" + callsign.RSTsent + "</td>";
|
||||||
worker += "<td>" + callsign.RSTrecv + "</td>" + "<td" + bgDX + ">";
|
worker += "<td>" + callsign.RSTrecv + "</td>" + "<td" + bgDX + ">";
|
||||||
if (callsign.DXcall.indexOf("CQ") == 0 || callsign.DXcall == "-")
|
if (callsign.DXcall.indexOf("CQ") == 0 || callsign.DXcall == "-") { worker += callsign.DXcall.formatCallsign(); }
|
||||||
{ worker += callsign.DXcall.formatCallsign(); }
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
worker +=
|
worker +=
|
||||||
|
@ -2825,8 +2802,7 @@ function tempGridToBox(iQTH, oldGrid, borderColor, boxColor, layer)
|
||||||
var LL = squareToLatLong(iQTH.substr(0, 4));
|
var LL = squareToLatLong(iQTH.substr(0, 4));
|
||||||
if (oldGrid)
|
if (oldGrid)
|
||||||
{
|
{
|
||||||
if (g_layerSources.temp.hasFeature(oldGrid))
|
if (g_layerSources.temp.hasFeature(oldGrid)) { g_layerSources.temp.removeFeature(oldGrid); }
|
||||||
{ g_layerSources.temp.removeFeature(oldGrid); }
|
|
||||||
}
|
}
|
||||||
var bounds = [
|
var bounds = [
|
||||||
[LL.lo1, LL.la1],
|
[LL.lo1, LL.la1],
|
||||||
|
@ -2918,8 +2894,7 @@ function onMyKeyDown(event)
|
||||||
var param2 = null;
|
var param2 = null;
|
||||||
if (typeof g_hotKeys[event.code].param2 != "undefined")
|
if (typeof g_hotKeys[event.code].param2 != "undefined")
|
||||||
{
|
{
|
||||||
if (typeof event[g_hotKeys[event.code].param2] != "undefined")
|
if (typeof event[g_hotKeys[event.code].param2] != "undefined") { param2 = event[g_hotKeys[event.code].param2]; }
|
||||||
{ param2 = event[g_hotKeys[event.code].param2]; }
|
|
||||||
}
|
}
|
||||||
g_hotKeys[event.code].func(g_hotKeys[event.code].param1, param2);
|
g_hotKeys[event.code].func(g_hotKeys[event.code].param1, param2);
|
||||||
}
|
}
|
||||||
|
@ -2935,8 +2910,7 @@ function onMyKeyDown(event)
|
||||||
var param2 = null;
|
var param2 = null;
|
||||||
if (typeof g_hotKeys[event.key].param2 != "undefined")
|
if (typeof g_hotKeys[event.key].param2 != "undefined")
|
||||||
{
|
{
|
||||||
if (typeof event[g_hotKeys[event.key].param2] != "undefined")
|
if (typeof event[g_hotKeys[event.key].param2] != "undefined") { param2 = event[g_hotKeys[event.key].param2]; }
|
||||||
{ param2 = event[g_hotKeys[event.key].param2]; }
|
|
||||||
}
|
}
|
||||||
g_hotKeys[event.key].func(g_hotKeys[event.key].param1, param2);
|
g_hotKeys[event.key].func(g_hotKeys[event.key].param1, param2);
|
||||||
}
|
}
|
||||||
|
@ -3142,8 +3116,7 @@ function makeTitleInfo(mapWindow)
|
||||||
news += " Layer: " + g_viewInfo[g_currentOverlay][1];
|
news += " Layer: " + g_viewInfo[g_currentOverlay][1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_currentOverlay == 0 && g_appSettings.gridViewMode == 1)
|
if (g_currentOverlay == 0 && g_appSettings.gridViewMode == 1) { return news + end; }
|
||||||
{ return news + end; }
|
|
||||||
|
|
||||||
var workline =
|
var workline =
|
||||||
" - Worked " +
|
" - Worked " +
|
||||||
|
@ -3870,8 +3843,7 @@ function mouseUpGrid()
|
||||||
|
|
||||||
if (g_tempGridBox)
|
if (g_tempGridBox)
|
||||||
{
|
{
|
||||||
if (g_layerSources.temp.hasFeature(g_tempGridBox))
|
if (g_layerSources.temp.hasFeature(g_tempGridBox)) { g_layerSources.temp.removeFeature(g_tempGridBox); }
|
||||||
{ g_layerSources.temp.removeFeature(g_tempGridBox); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_tempGridBox = null;
|
g_tempGridBox = null;
|
||||||
|
@ -3962,8 +3934,7 @@ function mouseOverDataItem(mouseEvent, fromHover)
|
||||||
if (
|
if (
|
||||||
typeof mouseEvent.spot != "undefined" &&
|
typeof mouseEvent.spot != "undefined" &&
|
||||||
g_receptionReports.spots[mouseEvent.spot].bearing > 180
|
g_receptionReports.spots[mouseEvent.spot].bearing > 180
|
||||||
)
|
) { noRoomRight = true; }
|
||||||
{ noRoomRight = true; }
|
|
||||||
myTooltip.style.left = getMouseX() + 15 + "px";
|
myTooltip.style.left = getMouseX() + 15 + "px";
|
||||||
top = parseInt(getMouseY() - 20 - (callListLength / 2) * 25);
|
top = parseInt(getMouseY() - 20 - (callListLength / 2) * 25);
|
||||||
if (windowWidth - getMouseX() < positionInfo.width || noRoomRight == true)
|
if (windowWidth - getMouseX() < positionInfo.width || noRoomRight == true)
|
||||||
|
@ -3998,8 +3969,7 @@ function mouseMoveDataItem(mouseEvent)
|
||||||
if (
|
if (
|
||||||
typeof mouseEvent.spot != "undefined" &&
|
typeof mouseEvent.spot != "undefined" &&
|
||||||
g_receptionReports.spots[mouseEvent.spot].bearing > 180
|
g_receptionReports.spots[mouseEvent.spot].bearing > 180
|
||||||
)
|
) { noRoomRight = true; }
|
||||||
{ noRoomRight = true; }
|
|
||||||
myTooltip.style.left = getMouseX() + 15 + "px";
|
myTooltip.style.left = getMouseX() + 15 + "px";
|
||||||
top = Number(myTooltip.style.top);
|
top = Number(myTooltip.style.top);
|
||||||
if (top > 20) top = getMouseY() - 20 + "px";
|
if (top > 20) top = getMouseY() - 20 + "px";
|
||||||
|
@ -4289,8 +4259,7 @@ function qthToQsoBox(
|
||||||
|
|
||||||
newRect.rectangle.qth = iQTH;
|
newRect.rectangle.qth = iQTH;
|
||||||
|
|
||||||
if (g_pushPinMode == false && entityVisibility == true)
|
if (g_pushPinMode == false && entityVisibility == true) { g_layerSources.qso.addFeature(newRect.rectangle); }
|
||||||
{ g_layerSources.qso.addFeature(newRect.rectangle); }
|
|
||||||
|
|
||||||
var newPin = g_colorLeafletQPins.worked[band];
|
var newPin = g_colorLeafletQPins.worked[band];
|
||||||
if (confirmed) newPin = g_colorLeafletQPins.confirmed[band];
|
if (confirmed) newPin = g_colorLeafletQPins.confirmed[band];
|
||||||
|
@ -4305,8 +4274,7 @@ function qthToQsoBox(
|
||||||
newRect.rectangle.pin.hashes[iHash] = 1;
|
newRect.rectangle.pin.hashes[iHash] = 1;
|
||||||
newRect.rectangle.pin.size = LL.size;
|
newRect.rectangle.pin.size = LL.size;
|
||||||
|
|
||||||
if (g_pushPinMode && entityVisibility == true)
|
if (g_pushPinMode && entityVisibility == true) { g_layerSources["qso-pins"].addFeature(newRect.rectangle.pin); }
|
||||||
{ g_layerSources["qso-pins"].addFeature(newRect.rectangle.pin); }
|
|
||||||
|
|
||||||
newRect.rectangle.locked = locked;
|
newRect.rectangle.locked = locked;
|
||||||
newRect.rectangle.worked = worked;
|
newRect.rectangle.worked = worked;
|
||||||
|
@ -4334,8 +4302,7 @@ function qthToQsoBox(
|
||||||
return rect.rectangle;
|
return rect.rectangle;
|
||||||
}
|
}
|
||||||
if (worked && !rect.rectangle.worked) rect.rectangle.worked = worked;
|
if (worked && !rect.rectangle.worked) rect.rectangle.worked = worked;
|
||||||
if (confirmed && !rect.rectangle.confirmed)
|
if (confirmed && !rect.rectangle.confirmed) { rect.rectangle.confirmed = confirmed; }
|
||||||
{ rect.rectangle.confirmed = confirmed; }
|
|
||||||
borderColor = g_mainBorderColor;
|
borderColor = g_mainBorderColor;
|
||||||
if (myDEbox) borderWeight = 1;
|
if (myDEbox) borderWeight = 1;
|
||||||
zIndex = 2;
|
zIndex = 2;
|
||||||
|
@ -4500,8 +4467,7 @@ function qthToBox(iQTH, iDEcallsign, iCQ, iNew, locked, DE, band, wspr, hash)
|
||||||
newRect.rectangle.pin.liveHash[hash] = 1;
|
newRect.rectangle.pin.liveHash[hash] = 1;
|
||||||
newRect.rectangle.pin.size = LL.size;
|
newRect.rectangle.pin.size = LL.size;
|
||||||
|
|
||||||
if (g_pushPinMode && entityVisibility == true)
|
if (g_pushPinMode && entityVisibility == true) { g_layerSources["live-pins"].addFeature(newRect.rectangle.pin); }
|
||||||
{ g_layerSources["live-pins"].addFeature(newRect.rectangle.pin); }
|
|
||||||
|
|
||||||
newRect.rectangle.locked = locked;
|
newRect.rectangle.locked = locked;
|
||||||
newRect.rectangle.size = LL.size;
|
newRect.rectangle.size = LL.size;
|
||||||
|
@ -4818,8 +4784,7 @@ function animatePaths()
|
||||||
{
|
{
|
||||||
if (g_flightPaths[i].age < g_timeNow)
|
if (g_flightPaths[i].age < g_timeNow)
|
||||||
{
|
{
|
||||||
if (typeof g_flightPaths[i].Arrow != "undefined")
|
if (typeof g_flightPaths[i].Arrow != "undefined") { g_layerSources.flight.removeFeature(g_flightPaths[i].Arrow); }
|
||||||
{ g_layerSources.flight.removeFeature(g_flightPaths[i].Arrow); }
|
|
||||||
g_layerSources.flight.removeFeature(g_flightPaths[i]);
|
g_layerSources.flight.removeFeature(g_flightPaths[i]);
|
||||||
delete g_flightPaths[i];
|
delete g_flightPaths[i];
|
||||||
g_flightPaths[i] = null;
|
g_flightPaths[i] = null;
|
||||||
|
@ -5059,8 +5024,7 @@ function clearCalls()
|
||||||
g_liveCallsigns[i].rect != null
|
g_liveCallsigns[i].rect != null
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (i in g_liveCallsigns[i].rect.liveHash)
|
if (i in g_liveCallsigns[i].rect.liveHash) { delete g_liveCallsigns[i].rect.liveHash[i]; }
|
||||||
{ delete g_liveCallsigns[i].rect.liveHash[i]; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5250,8 +5214,7 @@ function displayTime()
|
||||||
{
|
{
|
||||||
if (now - time > 120000)
|
if (now - time > 120000)
|
||||||
{
|
{
|
||||||
if (g_layerSources.strikes.hasFeature(g_bolts[time]))
|
if (g_layerSources.strikes.hasFeature(g_bolts[time])) { g_layerSources.strikes.removeFeature(g_bolts[time]); }
|
||||||
{ g_layerSources.strikes.removeFeature(g_bolts[time]); }
|
|
||||||
delete g_bolts[time];
|
delete g_bolts[time];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5431,8 +5394,7 @@ function toggleStrikeGlobal()
|
||||||
|
|
||||||
var worker =
|
var worker =
|
||||||
"<font color='yellow'>Strike Distance Changed<br/>" + msg + "</font>";
|
"<font color='yellow'>Strike Distance Changed<br/>" + msg + "</font>";
|
||||||
if (g_mapSettings.strikes == false)
|
if (g_mapSettings.strikes == false) { worker += "<br/><font color='red'>Detection is not enabled!</font>"; }
|
||||||
{ worker += "<br/><font color='red'>Detection is not enabled!</font>"; }
|
|
||||||
addLastTraffic(worker);
|
addLastTraffic(worker);
|
||||||
|
|
||||||
g_layerSources.strikes.clear();
|
g_layerSources.strikes.clear();
|
||||||
|
@ -5457,8 +5419,7 @@ function setStrikeDistance()
|
||||||
|
|
||||||
var send = "{\"west\":-180,\"east\":180,\"north\":-90,\"south\":-90}";
|
var send = "{\"west\":-180,\"east\":180,\"north\":-90,\"south\":-90}";
|
||||||
|
|
||||||
if (g_strikeInterval == null)
|
if (g_strikeInterval == null) { g_strikeInterval = setInterval(setStrikeDistance, 300000); }
|
||||||
{ g_strikeInterval = setInterval(setStrikeDistance, 300000); }
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -5988,8 +5949,7 @@ function toggleNexrad()
|
||||||
g_Nexrad = createNexRad();
|
g_Nexrad = createNexRad();
|
||||||
g_map.addLayer(g_Nexrad);
|
g_map.addLayer(g_Nexrad);
|
||||||
|
|
||||||
if (g_nexradInterval == null)
|
if (g_nexradInterval == null) { g_nexradInterval = setInterval(nexradRefresh, 600000); }
|
||||||
{ g_nexradInterval = setInterval(nexradRefresh, 600000); }
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6354,8 +6314,7 @@ function setCallAndGrid(callsign, grid, instance = null)
|
||||||
length = encodeQUTF8(responseArray, length, callsign);
|
length = encodeQUTF8(responseArray, length, callsign);
|
||||||
|
|
||||||
var hash = liveHash(callsign, thisInstance.Band, thisInstance.MO);
|
var hash = liveHash(callsign, thisInstance.Band, thisInstance.MO);
|
||||||
if (hash in g_liveCallsigns && g_liveCallsigns[hash].grid.length > 1)
|
if (hash in g_liveCallsigns && g_liveCallsigns[hash].grid.length > 1) { grid = g_liveCallsigns[hash].grid; }
|
||||||
{ grid = g_liveCallsigns[hash].grid; }
|
|
||||||
|
|
||||||
if (grid.length == 0) grid = " ";
|
if (grid.length == 0) grid = " ";
|
||||||
|
|
||||||
|
@ -6526,11 +6485,9 @@ function handleWsjtxStatus(newMessage)
|
||||||
|
|
||||||
if (DXcall.length > 1)
|
if (DXcall.length > 1)
|
||||||
{
|
{
|
||||||
if (!(newMessage.instance in g_lastTransmitCallsign))
|
if (!(newMessage.instance in g_lastTransmitCallsign)) { g_lastTransmitCallsign[newMessage.instance] = ""; }
|
||||||
{ g_lastTransmitCallsign[newMessage.instance] = ""; }
|
|
||||||
|
|
||||||
if (!(newMessage.instance in g_lastStatusCallsign))
|
if (!(newMessage.instance in g_lastStatusCallsign)) { g_lastStatusCallsign[newMessage.instance] = ""; }
|
||||||
{ g_lastStatusCallsign[newMessage.instance] = ""; }
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
lookupOnTx.checked == true &&
|
lookupOnTx.checked == true &&
|
||||||
|
@ -6681,8 +6638,7 @@ function handleWsjtxStatus(newMessage)
|
||||||
localDXReport.innerHTML = Number(
|
localDXReport.innerHTML = Number(
|
||||||
newMessage.Report.trim()
|
newMessage.Report.trim()
|
||||||
).formatSignalReport();
|
).formatSignalReport();
|
||||||
if (DXcall.length > 0)
|
if (DXcall.length > 0) { localDXCountry.innerHTML = g_dxccToAltName[callsignToDxcc(DXcall)]; }
|
||||||
{ localDXCountry.innerHTML = g_dxccToAltName[callsignToDxcc(DXcall)]; }
|
|
||||||
else localDXCountry.innerHTML = " ";
|
else localDXCountry.innerHTML = " ";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -7037,10 +6993,8 @@ function handleWsjtxDecode(newMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (validQTH) msgDEcallsign = decodeWords[decodeWords.length - 2].trim();
|
if (validQTH) msgDEcallsign = decodeWords[decodeWords.length - 2].trim();
|
||||||
if (validQTH == false && decodeWords.length == 3)
|
if (validQTH == false && decodeWords.length == 3) { msgDEcallsign = decodeWords[decodeWords.length - 2].trim(); }
|
||||||
{ msgDEcallsign = decodeWords[decodeWords.length - 2].trim(); }
|
if (validQTH == false && decodeWords.length == 2) { msgDEcallsign = decodeWords[decodeWords.length - 1].trim(); }
|
||||||
if (validQTH == false && decodeWords.length == 2)
|
|
||||||
{ msgDEcallsign = decodeWords[decodeWords.length - 1].trim(); }
|
|
||||||
if (decodeWords[0] == "CQ")
|
if (decodeWords[0] == "CQ")
|
||||||
{
|
{
|
||||||
CQ = true;
|
CQ = true;
|
||||||
|
@ -7056,8 +7010,7 @@ function handleWsjtxDecode(newMessage)
|
||||||
}
|
}
|
||||||
if (decodeWords.length >= 3 && CQ == true && validQTH == false)
|
if (decodeWords.length >= 3 && CQ == true && validQTH == false)
|
||||||
{
|
{
|
||||||
if (validateNumAndLetter(decodeWords[decodeWords.length - 1].trim()))
|
if (validateNumAndLetter(decodeWords[decodeWords.length - 1].trim())) { msgDEcallsign = decodeWords[decodeWords.length - 1].trim(); }
|
||||||
{ msgDEcallsign = decodeWords[decodeWords.length - 1].trim(); }
|
|
||||||
else msgDEcallsign = decodeWords[decodeWords.length - 2].trim();
|
else msgDEcallsign = decodeWords[decodeWords.length - 2].trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7074,8 +7027,7 @@ function handleWsjtxDecode(newMessage)
|
||||||
|
|
||||||
if (validQTH == "" && msgDEcallsign in g_gtCallsigns)
|
if (validQTH == "" && msgDEcallsign in g_gtCallsigns)
|
||||||
{
|
{
|
||||||
if (g_gtFlagPins[g_gtCallsigns[msgDEcallsign]].grid.length > 0)
|
if (g_gtFlagPins[g_gtCallsigns[msgDEcallsign]].grid.length > 0) { validQTH = g_gtFlagPins[g_gtCallsigns[msgDEcallsign]].grid; }
|
||||||
{ validQTH = g_gtFlagPins[g_gtCallsigns[msgDEcallsign]].grid; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var canPath = false;
|
var canPath = false;
|
||||||
|
@ -7155,8 +7107,7 @@ function handleWsjtxDecode(newMessage)
|
||||||
|
|
||||||
newCallsign.cont =
|
newCallsign.cont =
|
||||||
g_worldGeoData[g_dxccToGeoData[newCallsign.dxcc]].continent;
|
g_worldGeoData[g_dxccToGeoData[newCallsign.dxcc]].continent;
|
||||||
if (newCallsign.dxcc == 390 && newCallsign.zone == 1)
|
if (newCallsign.dxcc == 390 && newCallsign.zone == 1) { details.cont = "EU"; }
|
||||||
{ details.cont = "EU"; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newCallsign.ituza = Array();
|
newCallsign.ituza = Array();
|
||||||
|
@ -7319,8 +7270,7 @@ function handleWsjtxDecode(newMessage)
|
||||||
if (
|
if (
|
||||||
g_gtCallsigns[callsign.DEcall] in g_gtFlagPins &&
|
g_gtCallsigns[callsign.DEcall] in g_gtFlagPins &&
|
||||||
g_gtFlagPins[g_gtCallsigns[callsign.DEcall]].o == 1
|
g_gtFlagPins[g_gtCallsigns[callsign.DEcall]].o == 1
|
||||||
)
|
) { g_spotCollector[g_gtCallsigns[callsign.DEcall]] = callsign.RSTsent; }
|
||||||
{ g_spotCollector[g_gtCallsigns[callsign.DEcall]] = callsign.RSTsent; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7480,8 +7430,7 @@ function handleWsjtxDecode(newMessage)
|
||||||
else if (CCd.length == 3)
|
else if (CCd.length == 3)
|
||||||
{
|
{
|
||||||
// maybe it's DEL, or WYO. check the first two letters
|
// maybe it's DEL, or WYO. check the first two letters
|
||||||
if (CCd.substr(0, 2) in g_shapeData)
|
if (CCd.substr(0, 2) in g_shapeData) { locality = g_shapeData[CCd.substr(0, 2)]; }
|
||||||
{ locality = g_shapeData[CCd.substr(0, 2)]; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (locality == null)
|
if (locality == null)
|
||||||
|
@ -7631,13 +7580,11 @@ function handleWsjtxClear(newMessage)
|
||||||
if (
|
if (
|
||||||
g_liveCallsigns[hash].instance == newMessage.instance ||
|
g_liveCallsigns[hash].instance == newMessage.instance ||
|
||||||
g_liveCallsigns[hash].mode == g_instances[newMessage.instance].status.MO
|
g_liveCallsigns[hash].mode == g_instances[newMessage.instance].status.MO
|
||||||
)
|
) { delete g_liveCallsigns[hash]; }
|
||||||
{ delete g_liveCallsigns[hash]; }
|
|
||||||
}
|
}
|
||||||
for (var call in g_callRoster)
|
for (var call in g_callRoster)
|
||||||
{
|
{
|
||||||
if (g_callRoster[call].callObj.instance == newMessage.instance)
|
if (g_callRoster[call].callObj.instance == newMessage.instance) { delete g_callRoster[call]; }
|
||||||
{ delete g_callRoster[call]; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redrawGrids();
|
redrawGrids();
|
||||||
|
@ -7666,8 +7613,7 @@ function goProcessRoster(isRealtime = false)
|
||||||
{
|
{
|
||||||
if (isRealtime == true)
|
if (isRealtime == true)
|
||||||
{
|
{
|
||||||
if (g_callRosterWindowHandle.window.g_rosterSettings.realtime == false)
|
if (g_callRosterWindowHandle.window.g_rosterSettings.realtime == false) { return; }
|
||||||
{ return; }
|
|
||||||
}
|
}
|
||||||
g_callRosterWindowHandle.window.processRoster(g_callRoster);
|
g_callRosterWindowHandle.window.processRoster(g_callRoster);
|
||||||
}
|
}
|
||||||
|
@ -7934,8 +7880,7 @@ function showCallsignBox(redraw)
|
||||||
(thisCall in g_tracker.confirmed.call ? "✔" : "") +
|
(thisCall in g_tracker.confirmed.call ? "✔" : "") +
|
||||||
"</td>";
|
"</td>";
|
||||||
var ageString = "";
|
var ageString = "";
|
||||||
if (timeNowSec() - newCallList[x].time < 3601)
|
if (timeNowSec() - newCallList[x].time < 3601) { ageString = (timeNowSec() - newCallList[x].time).toDHMS(); }
|
||||||
{ ageString = (timeNowSec() - newCallList[x].time).toDHMS(); }
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ageString = userTimeString(newCallList[x].time * 1000);
|
ageString = userTimeString(newCallList[x].time * 1000);
|
||||||
|
@ -8112,8 +8057,7 @@ function myDxccCompare(a, b)
|
||||||
function myDxccIntCompare(a, b)
|
function myDxccIntCompare(a, b)
|
||||||
{
|
{
|
||||||
if (!(a in g_dxccToAltName)) return 0;
|
if (!(a in g_dxccToAltName)) return 0;
|
||||||
if (!(b in g_dxccToAltName))
|
if (!(b in g_dxccToAltName)) { return g_dxccToAltName[a].localeCompare(g_dxccToAltName[b]); }
|
||||||
{ return g_dxccToAltName[a].localeCompare(g_dxccToAltName[b]); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function myTimeCompare(a, b)
|
function myTimeCompare(a, b)
|
||||||
|
@ -8331,14 +8275,12 @@ function showWorkedBox(sortIndex, nextPage, redraw)
|
||||||
g_filterMode == "Phone" &&
|
g_filterMode == "Phone" &&
|
||||||
value.mode in g_modes_phone &&
|
value.mode in g_modes_phone &&
|
||||||
g_modes_phone[value.mode]
|
g_modes_phone[value.mode]
|
||||||
)
|
) { return true; }
|
||||||
{ return true; }
|
|
||||||
if (
|
if (
|
||||||
g_filterMode == "Digital" &&
|
g_filterMode == "Digital" &&
|
||||||
value.mode in g_modes &&
|
value.mode in g_modes &&
|
||||||
g_modes[value.mode]
|
g_modes[value.mode]
|
||||||
)
|
) { return true; }
|
||||||
{ return true; }
|
|
||||||
return value.mode == g_filterMode;
|
return value.mode == g_filterMode;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -8930,8 +8872,7 @@ function showDXCCsBox()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var unconfirmedTd = g_statsWindowHandle.window.document.getElementById("unconfirmed" + List[key].dxcc + "Id");
|
var unconfirmedTd = g_statsWindowHandle.window.document.getElementById("unconfirmed" + List[key].dxcc + "Id");
|
||||||
if (unconfirmedTd != null)
|
if (unconfirmedTd != null) { unconfirmedTd.addEventListener("mousedown", onMousedown); }
|
||||||
{ unconfirmedTd.addEventListener("mousedown", onMousedown); }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9334,8 +9275,7 @@ function openInfoTab(evt, tabName, callFunc, callObj)
|
||||||
}
|
}
|
||||||
if (evt)
|
if (evt)
|
||||||
{
|
{
|
||||||
if (typeof evt.currentTarget != "undefined")
|
if (typeof evt.currentTarget != "undefined") { evt.currentTarget.className += " active"; }
|
||||||
{ evt.currentTarget.className += " active"; }
|
|
||||||
else evt.className += " active";
|
else evt.className += " active";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9369,8 +9309,7 @@ function openSettingsTab(evt, tabName)
|
||||||
displayAlerts();
|
displayAlerts();
|
||||||
// Show the current tab, and add an "active" class to the button that opened the tab
|
// Show the current tab, and add an "active" class to the button that opened the tab
|
||||||
document.getElementById(tabName).style.display = "block";
|
document.getElementById(tabName).style.display = "block";
|
||||||
if (typeof evt.currentTarget != "undefined")
|
if (typeof evt.currentTarget != "undefined") { evt.currentTarget.className += " active"; }
|
||||||
{ evt.currentTarget.className += " active"; }
|
|
||||||
else evt.className += " active";
|
else evt.className += " active";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9580,10 +9519,8 @@ function renderStatsBox()
|
||||||
|
|
||||||
details.callsigns[call] = ~~details.callsigns[call] + 1;
|
details.callsigns[call] = ~~details.callsigns[call] + 1;
|
||||||
|
|
||||||
if (g_QSOhash[i].time < details.oldest)
|
if (g_QSOhash[i].time < details.oldest) { details.oldest = g_QSOhash[i].time; }
|
||||||
{ details.oldest = g_QSOhash[i].time; }
|
if (g_QSOhash[i].time > details.newest) { details.newest = g_QSOhash[i].time; }
|
||||||
if (g_QSOhash[i].time > details.newest)
|
|
||||||
{ details.newest = g_QSOhash[i].time; }
|
|
||||||
|
|
||||||
workObject(modet.Mixed, true, band, mode, type, didConfirm);
|
workObject(modet.Mixed, true, band, mode, type, didConfirm);
|
||||||
|
|
||||||
|
@ -9678,12 +9615,9 @@ function renderStatsBox()
|
||||||
long_distance.worked_hash = i;
|
long_distance.worked_hash = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(band in long_distance.band))
|
if (!(band in long_distance.band)) { long_distance.band[band] = newDistanceObject(); }
|
||||||
{ long_distance.band[band] = newDistanceObject(); }
|
if (!(mode in long_distance.mode)) { long_distance.mode[mode] = newDistanceObject(); }
|
||||||
if (!(mode in long_distance.mode))
|
if (!(type in long_distance.type)) { long_distance.type[type] = newDistanceObject(); }
|
||||||
{ long_distance.mode[mode] = newDistanceObject(); }
|
|
||||||
if (!(type in long_distance.type))
|
|
||||||
{ long_distance.type[type] = newDistanceObject(); }
|
|
||||||
|
|
||||||
if (unit > long_distance.mode[mode].worked_unit)
|
if (unit > long_distance.mode[mode].worked_unit)
|
||||||
{
|
{
|
||||||
|
@ -9735,12 +9669,9 @@ function renderStatsBox()
|
||||||
short_distance.worked_hash = i;
|
short_distance.worked_hash = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(band in short_distance.band))
|
if (!(band in short_distance.band)) { short_distance.band[band] = newDistanceObject(100000); }
|
||||||
{ short_distance.band[band] = newDistanceObject(100000); }
|
if (!(mode in short_distance.mode)) { short_distance.mode[mode] = newDistanceObject(100000); }
|
||||||
if (!(mode in short_distance.mode))
|
if (!(type in short_distance.type)) { short_distance.type[type] = newDistanceObject(100000); }
|
||||||
{ short_distance.mode[mode] = newDistanceObject(100000); }
|
|
||||||
if (!(type in short_distance.type))
|
|
||||||
{ short_distance.type[type] = newDistanceObject(100000); }
|
|
||||||
|
|
||||||
if (unit < short_distance.mode[mode].worked_unit)
|
if (unit < short_distance.mode[mode].worked_unit)
|
||||||
{
|
{
|
||||||
|
@ -9783,8 +9714,7 @@ function renderStatsBox()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(g_dxccToAltName[finalDxcc] in worldGeoData))
|
if (!(g_dxccToAltName[finalDxcc] in worldGeoData)) { worldGeoData[g_dxccToAltName[finalDxcc]] = newStatObject(); }
|
||||||
{ worldGeoData[g_dxccToAltName[finalDxcc]] = newStatObject(); }
|
|
||||||
|
|
||||||
workObject(
|
workObject(
|
||||||
worldGeoData[g_dxccToAltName[finalDxcc]],
|
worldGeoData[g_dxccToAltName[finalDxcc]],
|
||||||
|
@ -9827,8 +9757,7 @@ function renderStatsBox()
|
||||||
{
|
{
|
||||||
if (g_gridToITUZone[gridCheck].length == 1)
|
if (g_gridToITUZone[gridCheck].length == 1)
|
||||||
{
|
{
|
||||||
if (!(g_gridToITUZone[gridCheck][0] in ituZones))
|
if (!(g_gridToITUZone[gridCheck][0] in ituZones)) { ituZones[g_gridToITUZone[gridCheck][0]] = newStatObject(); }
|
||||||
{ ituZones[g_gridToITUZone[gridCheck][0]] = newStatObject(); }
|
|
||||||
|
|
||||||
workObject(
|
workObject(
|
||||||
ituZones[g_gridToITUZone[gridCheck][0]],
|
ituZones[g_gridToITUZone[gridCheck][0]],
|
||||||
|
@ -10182,11 +10111,9 @@ function createGtStationsTable(obj)
|
||||||
var bgDX = " style='font-weight:bold;color:cyan;' ";
|
var bgDX = " style='font-weight:bold;color:cyan;' ";
|
||||||
var bgDE = " style='font-weight:bold;color:yellow;' ";
|
var bgDE = " style='font-weight:bold;color:yellow;' ";
|
||||||
|
|
||||||
if (typeof callsign.msg == "undefined" || callsign.msg == "")
|
if (typeof callsign.msg == "undefined" || callsign.msg == "") { callsign.msg = "-"; }
|
||||||
{ callsign.msg = "-"; }
|
|
||||||
var ageString = "";
|
var ageString = "";
|
||||||
if (timeNowSec() - callsign.time < 3601)
|
if (timeNowSec() - callsign.time < 3601) { ageString = (timeNowSec() - callsign.time).toDHMS(); }
|
||||||
{ ageString = (timeNowSec() - callsign.time).toDHMS(); }
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ageString = userTimeString(callsign.time * 1000);
|
ageString = userTimeString(callsign.time * 1000);
|
||||||
|
@ -11103,8 +11030,7 @@ function setGtShareButtons()
|
||||||
g_mapSettings.offlineMode == false
|
g_mapSettings.offlineMode == false
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (g_appSettings.gtMsgEnable == true)
|
if (g_appSettings.gtMsgEnable == true) { msgButton.style.display = "inline-block"; }
|
||||||
{ msgButton.style.display = "inline-block"; }
|
|
||||||
else msgButton.style.display = "none";
|
else msgButton.style.display = "none";
|
||||||
|
|
||||||
gtFlagButton.style.display = "inline-block";
|
gtFlagButton.style.display = "inline-block";
|
||||||
|
@ -11199,8 +11125,7 @@ function setMsgEnable(checkbox)
|
||||||
g_appSettings.gtMsgEnable = checkbox.checked;
|
g_appSettings.gtMsgEnable = checkbox.checked;
|
||||||
if (g_appSettings.gtShareEnable == true)
|
if (g_appSettings.gtShareEnable == true)
|
||||||
{
|
{
|
||||||
if (g_appSettings.gtMsgEnable == true)
|
if (g_appSettings.gtMsgEnable == true) { msgButton.style.display = "inline-block"; }
|
||||||
{ msgButton.style.display = "inline-block"; }
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msgButton.style.display = "none";
|
msgButton.style.display = "none";
|
||||||
|
@ -11229,7 +11154,7 @@ function checkForNewVersion(showUptoDate)
|
||||||
if (typeof nw != "undefined")
|
if (typeof nw != "undefined")
|
||||||
{
|
{
|
||||||
getBuffer(
|
getBuffer(
|
||||||
"http://app.gridtracker.org/version.txt?lang=" + g_localeString,
|
"http://app.gridtracker.org/version.txt?lang=",
|
||||||
versionCheck,
|
versionCheck,
|
||||||
showUptoDate,
|
showUptoDate,
|
||||||
"http",
|
"http",
|
||||||
|
@ -11238,6 +11163,27 @@ function checkForNewVersion(showUptoDate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function downloadAcknowledgements()
|
||||||
|
{
|
||||||
|
if (g_mapSettings.offlineMode == false)
|
||||||
|
{
|
||||||
|
getBuffer(
|
||||||
|
"http://app.gridtracker.org/acknowledgements.json",
|
||||||
|
updateAcks,
|
||||||
|
null,
|
||||||
|
"http",
|
||||||
|
80
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkForNewAcknowledgements()
|
||||||
|
{
|
||||||
|
downloadAcknowledgements();
|
||||||
|
setTimeout(checkForNewAcknowledgements, 8640000);
|
||||||
|
readAcksFromDisk();
|
||||||
|
}
|
||||||
|
|
||||||
function renderBandActivity()
|
function renderBandActivity()
|
||||||
{
|
{
|
||||||
var buffer = "";
|
var buffer = "";
|
||||||
|
@ -11673,8 +11619,7 @@ function CheckForwardPortIsNotReceivePort(value)
|
||||||
udpForwardIpInput.value == "127.0.0.1" &&
|
udpForwardIpInput.value == "127.0.0.1" &&
|
||||||
udpPortInput.value == value &&
|
udpPortInput.value == value &&
|
||||||
g_appSettings.wsjtIP == ""
|
g_appSettings.wsjtIP == ""
|
||||||
)
|
) { return false; }
|
||||||
{ return false; }
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12092,8 +12037,7 @@ function workingCallsignsChanged(ele)
|
||||||
if (callsigns.length > 0)
|
if (callsigns.length > 0)
|
||||||
{
|
{
|
||||||
g_appSettings.workingCallsigns = Object.assign({}, g_tempWorkingCallsigns);
|
g_appSettings.workingCallsigns = Object.assign({}, g_tempWorkingCallsigns);
|
||||||
if (g_appSettings.workingCallsignEnable)
|
if (g_appSettings.workingCallsignEnable) { applyCallsignsAndDateDiv.style.display = ""; }
|
||||||
{ applyCallsignsAndDateDiv.style.display = ""; }
|
|
||||||
}
|
}
|
||||||
else applyCallsignsAndDateDiv.style.display = "none";
|
else applyCallsignsAndDateDiv.style.display = "none";
|
||||||
}
|
}
|
||||||
|
@ -12196,8 +12140,7 @@ function callsignToDxcc(insign)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callsign in g_directCallToDXCC)
|
if (callsign in g_directCallToDXCC) { return Number(g_directCallToDXCC[callsign]); }
|
||||||
{ return Number(g_directCallToDXCC[callsign]); }
|
|
||||||
|
|
||||||
if (callsign.includes("/"))
|
if (callsign.includes("/"))
|
||||||
{
|
{
|
||||||
|
@ -12230,8 +12173,7 @@ function callsignToDxcc(insign)
|
||||||
}
|
}
|
||||||
else callsign = parts[0];
|
else callsign = parts[0];
|
||||||
|
|
||||||
if (callsign in g_directCallToDXCC)
|
if (callsign in g_directCallToDXCC) { return Number(g_directCallToDXCC[callsign]); }
|
||||||
{ return Number(g_directCallToDXCC[callsign]); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var x = callsign.length; x > 0; x--)
|
for (var x = callsign.length; x > 0; x--)
|
||||||
|
@ -12275,8 +12217,7 @@ function loadMaidenHeadData()
|
||||||
delete g_worldGeoData[key].prefix;
|
delete g_worldGeoData[key].prefix;
|
||||||
for (var x = 0; x < g_worldGeoData[key].mh.length; x++)
|
for (var x = 0; x < g_worldGeoData[key].mh.length; x++)
|
||||||
{
|
{
|
||||||
if (!(g_worldGeoData[key].mh[x] in g_gridToDXCC))
|
if (!(g_worldGeoData[key].mh[x] in g_gridToDXCC)) { g_gridToDXCC[g_worldGeoData[key].mh[x]] = Array(); }
|
||||||
{ g_gridToDXCC[g_worldGeoData[key].mh[x]] = Array(); }
|
|
||||||
g_gridToDXCC[g_worldGeoData[key].mh[x]].push(g_worldGeoData[key].dxcc);
|
g_gridToDXCC[g_worldGeoData[key].mh[x]].push(g_worldGeoData[key].dxcc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12284,8 +12225,7 @@ function loadMaidenHeadData()
|
||||||
g_worldGeoData[key].dxcc != 291 &&
|
g_worldGeoData[key].dxcc != 291 &&
|
||||||
g_worldGeoData[key].dxcc != 110 &&
|
g_worldGeoData[key].dxcc != 110 &&
|
||||||
g_worldGeoData[key].dxcc != 6
|
g_worldGeoData[key].dxcc != 6
|
||||||
)
|
) { delete g_worldGeoData[key].mh; }
|
||||||
{ delete g_worldGeoData[key].mh; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file = "./data/dxcc.json";
|
file = "./data/dxcc.json";
|
||||||
|
@ -12303,16 +12243,14 @@ function loadMaidenHeadData()
|
||||||
|
|
||||||
for (var id in countyData)
|
for (var id in countyData)
|
||||||
{
|
{
|
||||||
if (!(countyData[id].properties.st in g_stateToCounty))
|
if (!(countyData[id].properties.st in g_stateToCounty)) { g_stateToCounty[countyData[id].properties.st] = Array(); }
|
||||||
{ g_stateToCounty[countyData[id].properties.st] = Array(); }
|
|
||||||
g_stateToCounty[countyData[id].properties.st].push(id);
|
g_stateToCounty[countyData[id].properties.st].push(id);
|
||||||
|
|
||||||
var cnty =
|
var cnty =
|
||||||
countyData[id].properties.st +
|
countyData[id].properties.st +
|
||||||
"," +
|
"," +
|
||||||
countyData[id].properties.n.toUpperCase().replaceAll(" ", "");
|
countyData[id].properties.n.toUpperCase().replaceAll(" ", "");
|
||||||
if (!(cnty in g_cntyToCounty))
|
if (!(cnty in g_cntyToCounty)) { g_cntyToCounty[cnty] = countyData[id].properties.n.toProperCase(); }
|
||||||
{ g_cntyToCounty[cnty] = countyData[id].properties.n.toProperCase(); }
|
|
||||||
|
|
||||||
g_countyData[cnty] = {};
|
g_countyData[cnty] = {};
|
||||||
g_countyData[cnty].geo = countyData[id];
|
g_countyData[cnty].geo = countyData[id];
|
||||||
|
@ -12340,33 +12278,28 @@ function loadMaidenHeadData()
|
||||||
g_shapeData = JSON.parse(fs.readFileSync(g_shapeFile));
|
g_shapeData = JSON.parse(fs.readFileSync(g_shapeFile));
|
||||||
for (var key in g_shapeData)
|
for (var key in g_shapeData)
|
||||||
{
|
{
|
||||||
if (g_shapeData[key].properties.alias == key)
|
if (g_shapeData[key].properties.alias == key) { g_shapeData[key].properties.alias = null; }
|
||||||
{ g_shapeData[key].properties.alias = null; }
|
|
||||||
else if (
|
else if (
|
||||||
g_shapeData[key].properties.alias &&
|
g_shapeData[key].properties.alias &&
|
||||||
g_shapeData[key].properties.alias.length > 2 &&
|
g_shapeData[key].properties.alias.length > 2 &&
|
||||||
(g_shapeData[key].properties.alias.indexOf("US") == 0 ||
|
(g_shapeData[key].properties.alias.indexOf("US") == 0 ||
|
||||||
g_shapeData[key].properties.alias.indexOf("CA") == 0)
|
g_shapeData[key].properties.alias.indexOf("CA") == 0)
|
||||||
)
|
) { g_shapeData[key].properties.alias = null; }
|
||||||
{ g_shapeData[key].properties.alias = null; }
|
|
||||||
if (
|
if (
|
||||||
g_shapeData[key].properties.alias &&
|
g_shapeData[key].properties.alias &&
|
||||||
g_shapeData[key].properties.alias.length < 2
|
g_shapeData[key].properties.alias.length < 2
|
||||||
)
|
) { g_shapeData[key].properties.alias = null; }
|
||||||
{ g_shapeData[key].properties.alias = null; }
|
|
||||||
if (g_shapeData[key].properties.alias != null)
|
if (g_shapeData[key].properties.alias != null)
|
||||||
{
|
{
|
||||||
if (key.indexOf("CN-") == 0)
|
if (key.indexOf("CN-") == 0)
|
||||||
{
|
{
|
||||||
if (g_shapeData[key].properties.alias == key.replace("CN-", ""))
|
if (g_shapeData[key].properties.alias == key.replace("CN-", "")) { g_shapeData[key].properties.alias = null; }
|
||||||
{ g_shapeData[key].properties.alias = null; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
g_shapeData[key].properties.alias != null &&
|
g_shapeData[key].properties.alias != null &&
|
||||||
g_shapeData[key].properties.alias.length != 2
|
g_shapeData[key].properties.alias.length != 2
|
||||||
)
|
) { g_shapeData[key].properties.alias = null; }
|
||||||
{ g_shapeData[key].properties.alias = null; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// finalDxcc == 291 || finalDxcc == 110 || finalDxcc == 6
|
// finalDxcc == 291 || finalDxcc == 110 || finalDxcc == 6
|
||||||
|
@ -12428,8 +12361,7 @@ function loadMaidenHeadData()
|
||||||
{
|
{
|
||||||
for (var x = 0; x < g_StateData[key].mh.length; x++)
|
for (var x = 0; x < g_StateData[key].mh.length; x++)
|
||||||
{
|
{
|
||||||
if (!(g_StateData[key].mh[x] in g_gridToState))
|
if (!(g_StateData[key].mh[x] in g_gridToState)) { g_gridToState[g_StateData[key].mh[x]] = Array(); }
|
||||||
{ g_gridToState[g_StateData[key].mh[x]] = Array(); }
|
|
||||||
g_gridToState[g_StateData[key].mh[x]].push(g_StateData[key].postal);
|
g_gridToState[g_StateData[key].mh[x]].push(g_StateData[key].postal);
|
||||||
}
|
}
|
||||||
g_StateData[key].worked_bands = {};
|
g_StateData[key].worked_bands = {};
|
||||||
|
@ -12479,8 +12411,7 @@ function loadMaidenHeadData()
|
||||||
{
|
{
|
||||||
for (var x = 0; x < g_cqZones[key].mh.length; x++)
|
for (var x = 0; x < g_cqZones[key].mh.length; x++)
|
||||||
{
|
{
|
||||||
if (!(g_cqZones[key].mh[x] in g_gridToCQZone))
|
if (!(g_cqZones[key].mh[x] in g_gridToCQZone)) { g_gridToCQZone[g_cqZones[key].mh[x]] = Array(); }
|
||||||
{ g_gridToCQZone[g_cqZones[key].mh[x]] = Array(); }
|
|
||||||
g_gridToCQZone[g_cqZones[key].mh[x]].push(String(key));
|
g_gridToCQZone[g_cqZones[key].mh[x]].push(String(key));
|
||||||
}
|
}
|
||||||
delete g_cqZones[key].mh;
|
delete g_cqZones[key].mh;
|
||||||
|
@ -12493,8 +12424,7 @@ function loadMaidenHeadData()
|
||||||
{
|
{
|
||||||
for (var x = 0; x < g_ituZones[key].mh.length; x++)
|
for (var x = 0; x < g_ituZones[key].mh.length; x++)
|
||||||
{
|
{
|
||||||
if (!(g_ituZones[key].mh[x] in g_gridToITUZone))
|
if (!(g_ituZones[key].mh[x] in g_gridToITUZone)) { g_gridToITUZone[g_ituZones[key].mh[x]] = Array(); }
|
||||||
{ g_gridToITUZone[g_ituZones[key].mh[x]] = Array(); }
|
|
||||||
g_gridToITUZone[g_ituZones[key].mh[x]].push(String(key));
|
g_gridToITUZone[g_ituZones[key].mh[x]].push(String(key));
|
||||||
}
|
}
|
||||||
delete g_ituZones[key].mh;
|
delete g_ituZones[key].mh;
|
||||||
|
@ -12803,6 +12733,34 @@ function versionCheck(buffer, flag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateAcks(buffer)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
g_acks = JSON.parse(buffer);
|
||||||
|
fs.writeFileSync(g_NWappData + "acknowledgements.json", JSON.stringify(g_acks));
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
// can't write, somethings broke
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readAcksFromDisk()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var fileBuf = fs.readFileSync(g_NWappData + "acknowledgements.json");
|
||||||
|
var loadedData = JSON.parse(fileBuf);
|
||||||
|
// some validation here?
|
||||||
|
g_acknowledgedCalls = loadedData;
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
// file failed to load, probably not downloaded
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onExitAppToGoWebsite()
|
function onExitAppToGoWebsite()
|
||||||
{
|
{
|
||||||
require("nw.gui").Shell.openExternal("https://gridtracker.org/");
|
require("nw.gui").Shell.openExternal("https://gridtracker.org/");
|
||||||
|
@ -12849,8 +12807,7 @@ function getBuffer(file_url, callback, flag, mode, port, cache = null)
|
||||||
{
|
{
|
||||||
var fsize = res.headers["content-length"];
|
var fsize = res.headers["content-length"];
|
||||||
var cookies = null;
|
var cookies = null;
|
||||||
if (typeof res.headers["set-cookie"] != "undefined")
|
if (typeof res.headers["set-cookie"] != "undefined") { cookies = res.headers["set-cookie"]; }
|
||||||
{ cookies = res.headers["set-cookie"]; }
|
|
||||||
res
|
res
|
||||||
.on("data", function (data)
|
.on("data", function (data)
|
||||||
{
|
{
|
||||||
|
@ -12903,8 +12860,7 @@ function getPostBuffer(
|
||||||
{
|
{
|
||||||
var fsize = res.headers["content-length"];
|
var fsize = res.headers["content-length"];
|
||||||
var cookies = null;
|
var cookies = null;
|
||||||
if (typeof res.headers["set-cookie"] != "undefined")
|
if (typeof res.headers["set-cookie"] != "undefined") { cookies = res.headers["set-cookie"]; }
|
||||||
{ cookies = res.headers["set-cookie"]; }
|
|
||||||
res
|
res
|
||||||
.on("data", function (data)
|
.on("data", function (data)
|
||||||
{
|
{
|
||||||
|
@ -13137,8 +13093,7 @@ function changeMapValues()
|
||||||
g_appSettings.gtFlagImgSrc > 0 &&
|
g_appSettings.gtFlagImgSrc > 0 &&
|
||||||
g_mapSettings.offlineMode == false &&
|
g_mapSettings.offlineMode == false &&
|
||||||
g_appSettings.gtShareEnable == true
|
g_appSettings.gtShareEnable == true
|
||||||
)
|
) { g_layerVectors.gtflags.setVisible(true); }
|
||||||
{ g_layerVectors.gtflags.setVisible(true); }
|
|
||||||
else g_layerVectors.gtflags.setVisible(false);
|
else g_layerVectors.gtflags.setVisible(false);
|
||||||
|
|
||||||
saveMapSettings();
|
saveMapSettings();
|
||||||
|
@ -13564,8 +13519,7 @@ function setMsgSettingsView()
|
||||||
msgAlertMedia.style.display = "none";
|
msgAlertMedia.style.display = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_msgSettings.msgAwaySelect > 0)
|
if (g_msgSettings.msgAwaySelect > 0) { msgAwayTextDiv.style.display = "inline-block"; }
|
||||||
{ msgAwayTextDiv.style.display = "inline-block"; }
|
|
||||||
else msgAwayTextDiv.style.display = "none";
|
else msgAwayTextDiv.style.display = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13605,8 +13559,7 @@ function loadAdifSettings()
|
||||||
}
|
}
|
||||||
for (var key in g_adifLogSettings.startup)
|
for (var key in g_adifLogSettings.startup)
|
||||||
{
|
{
|
||||||
if (document.getElementById(key) != null)
|
if (document.getElementById(key) != null) { document.getElementById(key).checked = g_adifLogSettings.startup[key]; }
|
||||||
{ document.getElementById(key).checked = g_adifLogSettings.startup[key]; }
|
|
||||||
}
|
}
|
||||||
for (var key in g_adifLogSettings.nickname)
|
for (var key in g_adifLogSettings.nickname)
|
||||||
{
|
{
|
||||||
|
@ -13825,6 +13778,7 @@ var g_startupTable = [
|
||||||
[startupEventsAndTimers, "Set Events and Timers"],
|
[startupEventsAndTimers, "Set Events and Timers"],
|
||||||
[registerHotKeys, "Registered Hotkeys"],
|
[registerHotKeys, "Registered Hotkeys"],
|
||||||
[gtChatSystemInit, "User System Initialized"],
|
[gtChatSystemInit, "User System Initialized"],
|
||||||
|
[downloadAcknowledgements, "Contributor Acknowledgements Loaded"],
|
||||||
[postInit, "Finalizing System"]
|
[postInit, "Finalizing System"]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -14081,8 +14035,7 @@ var g_currentID = null;
|
||||||
|
|
||||||
function updateWsjtxListener(port)
|
function updateWsjtxListener(port)
|
||||||
{
|
{
|
||||||
if (port == g_wsjtCurrentPort && g_appSettings.wsjtIP == g_wsjtCurrentIP)
|
if (port == g_wsjtCurrentPort && g_appSettings.wsjtIP == g_wsjtCurrentIP) { return; }
|
||||||
{ return; }
|
|
||||||
if (g_wsjtUdpServer != null)
|
if (g_wsjtUdpServer != null)
|
||||||
{
|
{
|
||||||
if (multicastEnable.checked == true && g_appSettings.wsjtIP != "")
|
if (multicastEnable.checked == true && g_appSettings.wsjtIP != "")
|
||||||
|
@ -14449,8 +14402,7 @@ function loadLookupDetails()
|
||||||
}
|
}
|
||||||
ValidateText(lookupLogin);
|
ValidateText(lookupLogin);
|
||||||
ValidateText(lookupPassword);
|
ValidateText(lookupPassword);
|
||||||
if (lookupService.value == "CALLOOK")
|
if (lookupService.value == "CALLOOK") { lookupCredentials.style.display = "none"; }
|
||||||
{ lookupCredentials.style.display = "none"; }
|
|
||||||
else lookupCredentials.style.display = "block";
|
else lookupCredentials.style.display = "block";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14479,8 +14431,7 @@ function lookupValueChanged(what)
|
||||||
g_appSettings.lookupCallookPreferred = lookupCallookPreferred.checked;
|
g_appSettings.lookupCallookPreferred = lookupCallookPreferred.checked;
|
||||||
lookupQrzTestResult.innerHTML = "";
|
lookupQrzTestResult.innerHTML = "";
|
||||||
g_qrzLookupSessionId = null;
|
g_qrzLookupSessionId = null;
|
||||||
if (lookupService.value == "CALLOOK")
|
if (lookupService.value == "CALLOOK") { lookupCredentials.style.display = "none"; }
|
||||||
{ lookupCredentials.style.display = "none"; }
|
|
||||||
else lookupCredentials.style.display = "block";
|
else lookupCredentials.style.display = "block";
|
||||||
if (ValidateText(lookupLogin) && ValidateText(lookupPassword))
|
if (ValidateText(lookupLogin) && ValidateText(lookupPassword))
|
||||||
{
|
{
|
||||||
|
@ -15052,8 +15003,7 @@ function getLookupCachedObject(
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (request.result != null && resultFunction)
|
if (request.result != null && resultFunction) { resultFunction(request.result, gridPass, false); }
|
||||||
{ resultFunction(request.result, gridPass, false); }
|
|
||||||
else if (noResultFunction) noResultFunction(call, gridPass);
|
else if (noResultFunction) noResultFunction(call, gridPass);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15545,8 +15495,7 @@ function saveToCsv(lookup)
|
||||||
if (
|
if (
|
||||||
getLookProp(lookup, "land").length > 0 &&
|
getLookProp(lookup, "land").length > 0 &&
|
||||||
country != getLookProp(lookup, "land")
|
country != getLookProp(lookup, "land")
|
||||||
)
|
) { country = getLookProp(lookup, "land"); }
|
||||||
{ country = getLookProp(lookup, "land"); }
|
|
||||||
if (country == "United States") country = "";
|
if (country == "United States") country = "";
|
||||||
|
|
||||||
tryToWriteAdifToDocFolder(
|
tryToWriteAdifToDocFolder(
|
||||||
|
@ -15634,8 +15583,7 @@ function joinCommaIf(camera1, camera2)
|
||||||
|
|
||||||
function joinIfBothWithDash(camera1, camera2)
|
function joinIfBothWithDash(camera1, camera2)
|
||||||
{
|
{
|
||||||
if (camera1.length > 0 && camera2.length > 0)
|
if (camera1.length > 0 && camera2.length > 0) { return camera1 + " / " + camera2; }
|
||||||
{ return camera1 + " / " + camera2; }
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15661,7 +15609,7 @@ function searchLogForCallsign(call)
|
||||||
|
|
||||||
var worker = ""
|
var worker = ""
|
||||||
|
|
||||||
if (g_acknowledgedCalls[call])
|
if (call in g_acknowledgedCalls)
|
||||||
{
|
{
|
||||||
worker = `<h3>GridTracker would like to acknowledge ${call}: ` +
|
worker = `<h3>GridTracker would like to acknowledge ${call}: ` +
|
||||||
`<img class='lookupAckBadge' src='${g_acknowledgedCalls[call].badge}'> ${g_acknowledgedCalls[call].message}</h3>`
|
`<img class='lookupAckBadge' src='${g_acknowledgedCalls[call].badge}'> ${g_acknowledgedCalls[call].message}</h3>`
|
||||||
|
@ -15738,8 +15686,7 @@ function searchLogForCallsign(call)
|
||||||
if (String(dxcc) + g_colorBands[band] in g_tracker.worked.dxcc)
|
if (String(dxcc) + g_colorBands[band] in g_tracker.worked.dxcc)
|
||||||
{
|
{
|
||||||
var strike = "";
|
var strike = "";
|
||||||
if (String(dxcc) + g_colorBands[band] in g_tracker.confirmed.dxcc)
|
if (String(dxcc) + g_colorBands[band] in g_tracker.confirmed.dxcc) { strike = "text-decoration: underline overline;"; }
|
||||||
{ strike = "text-decoration: underline overline;"; }
|
|
||||||
worker +=
|
worker +=
|
||||||
"<div style='" +
|
"<div style='" +
|
||||||
strike +
|
strike +
|
||||||
|
@ -15962,8 +15909,7 @@ function mediaCheck()
|
||||||
g_QSOhash[i].px == null
|
g_QSOhash[i].px == null
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (g_QSOhash[i].dxcc != -1)
|
if (g_QSOhash[i].dxcc != -1) { g_QSOhash[i].px = getWpx(g_QSOhash[i].DEcall); }
|
||||||
{ g_QSOhash[i].px = getWpx(g_QSOhash[i].DEcall); }
|
|
||||||
else g_QSOhash[i].px = null;
|
else g_QSOhash[i].px = null;
|
||||||
}
|
}
|
||||||
g_QSOcount++;
|
g_QSOcount++;
|
||||||
|
@ -16019,8 +15965,7 @@ function loadReceptionReports()
|
||||||
g_receptionReports = JSON.parse(
|
g_receptionReports = JSON.parse(
|
||||||
fs.readFileSync(g_NWappData + "spots.json")
|
fs.readFileSync(g_NWappData + "spots.json")
|
||||||
);
|
);
|
||||||
if (timeNowSec() - g_receptionReports.lastDownloadTimeSec <= 86400)
|
if (timeNowSec() - g_receptionReports.lastDownloadTimeSec <= 86400) { clear = false; }
|
||||||
{ clear = false; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clear == true)
|
if (clear == true)
|
||||||
|
@ -16128,8 +16073,7 @@ function pskSpotResults(buffer, flag)
|
||||||
if (
|
if (
|
||||||
parseInt(json.receptionReport[key].flowStartSeconds) <
|
parseInt(json.receptionReport[key].flowStartSeconds) <
|
||||||
report.when
|
report.when
|
||||||
)
|
) { continue; }
|
||||||
{ continue; }
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -16261,8 +16205,7 @@ function createSpot(report, key, fromPoint, addToLayer = true)
|
||||||
: workingColor == 361
|
: workingColor == 361
|
||||||
? "#FFFFFF"
|
? "#FFFFFF"
|
||||||
: "hsla(" + workingColor + ", 100%, 50%," + report.color / 255 + ")";
|
: "hsla(" + workingColor + ", 100%, 50%," + report.color / 255 + ")";
|
||||||
if (workingColor < 1 || workingColor == 361)
|
if (workingColor < 1 || workingColor == 361) { spotColor = intAlphaToRGB(testColor.substr(0, 7), report.color); }
|
||||||
{ spotColor = intAlphaToRGB(testColor.substr(0, 7), report.color); }
|
|
||||||
else spotColor = testColor;
|
else spotColor = testColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16432,8 +16375,7 @@ function spotPathChange()
|
||||||
spotPathColorDiv.style.color = "#FFF";
|
spotPathColorDiv.style.color = "#FFF";
|
||||||
spotPathColorDiv.style.backgroundColor = pathColor;
|
spotPathColorDiv.style.backgroundColor = pathColor;
|
||||||
}
|
}
|
||||||
if (g_receptionSettings.pathColor == -1)
|
if (g_receptionSettings.pathColor == -1) { spotPathInfoTd.innerHTML = "PSK-Reporter Palette"; }
|
||||||
{ spotPathInfoTd.innerHTML = "PSK-Reporter Palette"; }
|
|
||||||
else spotPathInfoTd.innerHTML = "";
|
else spotPathInfoTd.innerHTML = "";
|
||||||
|
|
||||||
g_spotFlightColor =
|
g_spotFlightColor =
|
||||||
|
@ -16460,8 +16402,7 @@ function spotPathChange()
|
||||||
spotNightPathColorDiv.style.color = "#FFF";
|
spotNightPathColorDiv.style.color = "#FFF";
|
||||||
spotNightPathColorDiv.style.backgroundColor = pathNightColor;
|
spotNightPathColorDiv.style.backgroundColor = pathNightColor;
|
||||||
}
|
}
|
||||||
if (g_receptionSettings.pathNightColor == -1)
|
if (g_receptionSettings.pathNightColor == -1) { spotNightPathInfoTd.innerHTML = "PSK-Reporter Palette"; }
|
||||||
{ spotNightPathInfoTd.innerHTML = "PSK-Reporter Palette"; }
|
|
||||||
else spotNightPathInfoTd.innerHTML = "";
|
else spotNightPathInfoTd.innerHTML = "";
|
||||||
|
|
||||||
g_spotNightFlightColor =
|
g_spotNightFlightColor =
|
||||||
|
|
Ładowanie…
Reference in New Issue