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