kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
				
				
				
			
							rodzic
							
								
									a36f22bd92
								
							
						
					
					
						commit
						470c76f610
					
				| 
						 | 
				
			
			@ -13,7 +13,7 @@ module.exports = {
 | 
			
		|||
    SharedArrayBuffer: "readonly"
 | 
			
		||||
  },
 | 
			
		||||
  parserOptions: {
 | 
			
		||||
    ecmaVersion: 2018
 | 
			
		||||
    ecmaVersion: 2021
 | 
			
		||||
  },
 | 
			
		||||
  rules: {
 | 
			
		||||
    /* See https://eslint.org/docs/rules/ */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		|||
  <script src="./lib/screens.js" type="text/javascript"></script>
 | 
			
		||||
  <script src="./lib/alerts.js" type="text/javascript"></script>
 | 
			
		||||
  <script src="./lib/third-party.js" type="text/javascript"></script>
 | 
			
		||||
  <script src="./lib/grid-math.js" type="text/javascript"></script>
 | 
			
		||||
  <script src="./lib/adif.js" type="text/javascript"></script>
 | 
			
		||||
  <script src="./lib/ol.js" type="text/javascript"></script>
 | 
			
		||||
  <script src="./lib/arc.js" type="text/javascript"></script>
 | 
			
		||||
| 
						 | 
				
			
			@ -304,7 +305,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		|||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div id="pskReporterBandActivityDiv" class="roundBorder" style="
 | 
			
		||||
      <div id="bandActivityDiv" class="roundBorder" style="
 | 
			
		||||
            position: relative;
 | 
			
		||||
            background-color: #000;
 | 
			
		||||
            border: 1px solid purple;
 | 
			
		||||
| 
						 | 
				
			
			@ -312,7 +313,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		|||
            height: 49px;
 | 
			
		||||
            margin-bottom: 1px;
 | 
			
		||||
            padding: 0px;
 | 
			
		||||
          " title="PSK-Reporter Band Activity" oncontextmenu="toggleBaWindow(event)">
 | 
			
		||||
          " title="Band Activity" oncontextmenu="toggleBaWindow(event)">
 | 
			
		||||
        <div data-i18n="sidebarNoDataYet" id="graphDiv" style="bottom: 0; position: absolute; width: 100%; padding: 0px; margin-bottom: 2px">
 | 
			
		||||
         ...no data yet...
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -2885,7 +2886,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		|||
          </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="mapItem" id="GTspotDiv">
 | 
			
		||||
      <div class="mapItem">
 | 
			
		||||
        <table align="center">
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td data-i18n="settings.OAMS.spotting.enable.label"
 | 
			
		||||
| 
						 | 
				
			
			@ -2900,6 +2901,35 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		|||
        </table>
 | 
			
		||||
      </div>
 | 
			
		||||
      <br />
 | 
			
		||||
      <div class="mapItem">
 | 
			
		||||
        <table align="center">
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td data-i18n="settings.OAMS.BandActivity.enable.label"
 | 
			
		||||
              title="Receive Band Activity Reports through the OAMS network">Band Activity</td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
              <input title="Enable / Disable Band Activity" type="checkbox" id="oamsBandActivity"
 | 
			
		||||
                onclick="setOamsBandActivity(this);" />
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
        <div class="mapItem" id="bandActivityNeighborDiv">
 | 
			
		||||
          <table align="center">
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td data-i18n="settings.OAMS.BandActivity.neighbor.enable.label"
 | 
			
		||||
                title="Include your 8 neighboring grids in report">Neighboring Grids</td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td>
 | 
			
		||||
                <input title="Enable / Disable Neighbor Grids" type="checkbox" id="oamsBandActivityNeighbors"
 | 
			
		||||
                  onclick="setOamsBandActivityNeighbors(this);" />
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
          </table>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <br />
 | 
			
		||||
      <div id="msgSettingsDiv" class="mapItem" style="padding: 5px">
 | 
			
		||||
        <div class="mapItem">
 | 
			
		||||
          <table align="center">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,6 +40,7 @@
 | 
			
		|||
 | 
			
		||||
  <body
 | 
			
		||||
    id="mainBody"
 | 
			
		||||
    onload="window.opener.g_baWindowInitialized = true"
 | 
			
		||||
    style="
 | 
			
		||||
      -webkit-app-region: drag;
 | 
			
		||||
      margin: 0px;
 | 
			
		||||
| 
						 | 
				
			
			@ -57,7 +58,7 @@
 | 
			
		|||
    "
 | 
			
		||||
  >
 | 
			
		||||
    <div
 | 
			
		||||
      id="pskReporterBandActivityDiv"
 | 
			
		||||
      id="bandActivityDiv"
 | 
			
		||||
      style="
 | 
			
		||||
        position: relative;
 | 
			
		||||
        background-color: #000;
 | 
			
		||||
| 
						 | 
				
			
			@ -67,7 +68,7 @@
 | 
			
		|||
        margin-bottom: 1px;
 | 
			
		||||
        padding: 0px;
 | 
			
		||||
      "
 | 
			
		||||
      title="PSK-Reporter Band Activity"
 | 
			
		||||
      title="Band Activity"
 | 
			
		||||
    >
 | 
			
		||||
      <div data-i18n="bandactivity.noData" id="graphDiv" style="bottom: 0; position: absolute; width: 100%; padding: 0px; margin-bottom: 2px">
 | 
			
		||||
        <br />...no data yet...<br />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -426,6 +426,10 @@
 | 
			
		|||
    "settings.OAMS.message.enable.hover": "啟用消息傳遞",
 | 
			
		||||
    "settings.OAMS.spotting.enable.label": "啟用定位",
 | 
			
		||||
    "settings.OAMS.spotting.enable.hover": "通過OAMS網絡發送和接收現場報告",
 | 
			
		||||
    "settings.OAMS.BandActivity.enable.label": "Band Activity",
 | 
			
		||||
    "settings.OAMS.BandActivity.enable.hover": "Receive Band Activity Reports through the OAMS network",
 | 
			
		||||
    "settings.OAMS.BandActivity.neighbor.enable.label": "Neighboring Grids",
 | 
			
		||||
    "settings.OAMS.BandActivity.neighbor.enable.hover": "Include your 8 neighboring grids in report",
 | 
			
		||||
    "settings.OAMS.message.newAlert.label": "新消息警報",
 | 
			
		||||
    "settings.OAMS.message.newAlert.hover": "收到新消息時發出警報。",
 | 
			
		||||
    "settings.OAMS.message.newAlert.none": "None",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -425,6 +425,10 @@
 | 
			
		|||
    "settings.OAMS.message.enable.hover": "启用消息传递",
 | 
			
		||||
    "settings.OAMS.spotting.enable.label": "启用定位",
 | 
			
		||||
    "settings.OAMS.spotting.enable.hover": "通过OAMS网络发送和接收现场报告",
 | 
			
		||||
    "settings.OAMS.BandActivity.enable.label": "Band Activity",
 | 
			
		||||
    "settings.OAMS.BandActivity.enable.hover": "Receive Band Activity Reports through the OAMS network",
 | 
			
		||||
    "settings.OAMS.BandActivity.neighbor.enable.label": "Neighboring Grids",
 | 
			
		||||
    "settings.OAMS.BandActivity.neighbor.enable.hover": "Include your 8 neighboring grids in report",
 | 
			
		||||
    "settings.OAMS.message.newAlert.label": "新消息警报",
 | 
			
		||||
    "settings.OAMS.message.newAlert.hover": "收到新消息时发出警报。",
 | 
			
		||||
    "settings.OAMS.message.newAlert.none": "None",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,7 +43,7 @@
 | 
			
		|||
    "info.DXDistance.hover": "Distance",
 | 
			
		||||
    "info.DXAzimuth.hover": "Heading",
 | 
			
		||||
    "operatingMode.hover": "Click to ignore incoming messages",
 | 
			
		||||
    "bandActivity.hover": "PSK-Reporter band Activity",
 | 
			
		||||
    "bandActivity.hover": "Band Activity",
 | 
			
		||||
    "quickStats.hover": "Quick Stats",
 | 
			
		||||
    "quickStats.CallRX.hover": "Callsigns Heard",
 | 
			
		||||
    "quickStats.CallRX.label": "Rx Calls",
 | 
			
		||||
| 
						 | 
				
			
			@ -420,10 +420,14 @@
 | 
			
		|||
    "settings.alerts.CustomAlerts.new.repeat.once": "Only Once",
 | 
			
		||||
    "settings.alerts.CustomAlerts.new.repeat.never": "Never Repeat",
 | 
			
		||||
    "settings.alerts.CustomAlerts.new.addButton": "ADD",
 | 
			
		||||
    "settings.OAMS.message.enable.label": "Messaging Enable",
 | 
			
		||||
    "settings.OAMS.message.enable.hover": "Messaging Enable",
 | 
			
		||||
    "settings.OAMS.spotting.enable.label": "Spotting Enable",
 | 
			
		||||
    "settings.OAMS.message.enable.label": "Messaging",
 | 
			
		||||
    "settings.OAMS.message.enable.hover": "Messaging",
 | 
			
		||||
    "settings.OAMS.spotting.enable.label": "Spotting",
 | 
			
		||||
    "settings.OAMS.spotting.enable.hover": "Send and Receivev Spot Reports through the OAMS network",
 | 
			
		||||
    "settings.OAMS.BandActivity.enable.label": "Band Activity",
 | 
			
		||||
    "settings.OAMS.BandActivity.enable.hover": "Receive Band Activity Reports through the OAMS network",
 | 
			
		||||
    "settings.OAMS.BandActivity.neighbor.enable.label": "Neighboring Grids",
 | 
			
		||||
    "settings.OAMS.BandActivity.neighbor.enable.hover": "Include your 8 neighboring grids in report",
 | 
			
		||||
    "settings.OAMS.message.newAlert.label": "New Message Alert",
 | 
			
		||||
    "settings.OAMS.message.newAlert.hover": "Alert when new messages received.",
 | 
			
		||||
    "settings.OAMS.message.newAlert.none": "None",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,6 +74,8 @@ var def_appSettings = {
 | 
			
		|||
  myRawCall: "NOCALL",
 | 
			
		||||
  myRawFreq: "",
 | 
			
		||||
  myRawGrid: "",
 | 
			
		||||
  oamsBandActivity: true,
 | 
			
		||||
  oamsBandActivityNeighbors: false,
 | 
			
		||||
  pathWidthWeight: 1.0,
 | 
			
		||||
  potaEnabled: 1,
 | 
			
		||||
  potaShowMenu: true,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,88 @@
 | 
			
		|||
// Copyright © 2023 N7YHF
 | 
			
		||||
// Permission granted to GridTracker.org for use.
 | 
			
		||||
 | 
			
		||||
function fieldNumberToLetter(number)
 | 
			
		||||
{
 | 
			
		||||
  return String.fromCharCode(number + 65);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Input already uppercased
 | 
			
		||||
function squareToNeighbors(square)
 | 
			
		||||
{
 | 
			
		||||
  const neighborMatrix = [
 | 
			
		||||
    [-1, +1], // NW
 | 
			
		||||
    [0, +1], // N
 | 
			
		||||
    [+1, +1], // NE
 | 
			
		||||
 | 
			
		||||
    [-1, 0], // W
 | 
			
		||||
    [0, 0], // Self
 | 
			
		||||
    [+1, 0], // E
 | 
			
		||||
 | 
			
		||||
    [-1, -1], // SW
 | 
			
		||||
    [0, -1], // S
 | 
			
		||||
    [+1, -1] // SE
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  // RL90
 | 
			
		||||
  // ^^---- RL is the "field"
 | 
			
		||||
  //   ^^---- 90 is the "square"
 | 
			
		||||
 | 
			
		||||
  const fieldX = square.charCodeAt(0) - 65;
 | 
			
		||||
  const fieldY = square.charCodeAt(1) - 65;
 | 
			
		||||
 | 
			
		||||
  const squareX = square.charCodeAt(2) - 48;
 | 
			
		||||
  const squareY = square.charCodeAt(3) - 48;
 | 
			
		||||
 | 
			
		||||
  const neighbors = [];
 | 
			
		||||
 | 
			
		||||
  for (const [dx, dy] of neighborMatrix)
 | 
			
		||||
  {
 | 
			
		||||
    let neighborFieldX = fieldX;
 | 
			
		||||
    let neighborFieldY = fieldY;
 | 
			
		||||
 | 
			
		||||
    let neighborSquareX = squareX + dx;
 | 
			
		||||
    let neighborSquareY = squareY + dy;
 | 
			
		||||
 | 
			
		||||
    if (neighborSquareX < 0)
 | 
			
		||||
    {
 | 
			
		||||
      neighborSquareX += 10;
 | 
			
		||||
      neighborFieldX -= 1;
 | 
			
		||||
    }
 | 
			
		||||
    else if (neighborSquareX > 9)
 | 
			
		||||
    {
 | 
			
		||||
      neighborSquareX -= 10;
 | 
			
		||||
      neighborFieldX += 1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (neighborSquareY < 0)
 | 
			
		||||
    {
 | 
			
		||||
      neighborSquareY += 10;
 | 
			
		||||
      neighborFieldY -= 1;
 | 
			
		||||
    }
 | 
			
		||||
    else if (neighborSquareY > 9)
 | 
			
		||||
    {
 | 
			
		||||
      neighborSquareY -= 10;
 | 
			
		||||
      neighborFieldY += 1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (neighborFieldX < 0)
 | 
			
		||||
    {
 | 
			
		||||
      neighborFieldX += 18;
 | 
			
		||||
    }
 | 
			
		||||
    else if (neighborFieldX > 17)
 | 
			
		||||
    {
 | 
			
		||||
      neighborFieldX -= 18;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (neighborFieldY < 0 || neighborFieldY > 17)
 | 
			
		||||
    {
 | 
			
		||||
      continue;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const neighbor = `${fieldNumberToLetter(neighborFieldX)}${fieldNumberToLetter(neighborFieldY)}${neighborSquareX}${neighborSquareY}`;
 | 
			
		||||
 | 
			
		||||
    neighbors.push(neighbor);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return neighbors;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -65,7 +65,7 @@ var g_statsWindowHandle = null;
 | 
			
		|||
var g_lookupWindowHandle = null;
 | 
			
		||||
var g_lookupWindowInitialized = false;
 | 
			
		||||
var g_baWindowHandle = null;
 | 
			
		||||
 | 
			
		||||
var g_baWindowInitialized = false;
 | 
			
		||||
var g_appSettings = {};
 | 
			
		||||
var g_mapSettings = {};
 | 
			
		||||
var g_legendColors = {};
 | 
			
		||||
| 
						 | 
				
			
			@ -173,6 +173,8 @@ function loadAllSettings()
 | 
			
		|||
 | 
			
		||||
loadAllSettings();
 | 
			
		||||
 | 
			
		||||
const k_frequencyBucket = 10000;
 | 
			
		||||
 | 
			
		||||
var myDEcall = g_appSettings.myDEcall;
 | 
			
		||||
var myDEGrid = g_appSettings.myDEGrid;
 | 
			
		||||
var myDXGrid = "";
 | 
			
		||||
| 
						 | 
				
			
			@ -862,7 +864,7 @@ function toggleOffline()
 | 
			
		|||
        document.getElementById(where).style.display = "none";
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    pskReporterBandActivityDiv.style.display = "block";
 | 
			
		||||
    bandActivityDiv.style.display = "block";
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
| 
						 | 
				
			
			@ -875,7 +877,7 @@ function toggleOffline()
 | 
			
		|||
    buttonLOTWCheckBoxDiv.style.display = "none";
 | 
			
		||||
    buttonClubCheckBoxDiv.style.display = "none";
 | 
			
		||||
    gtFlagButton.style.display = "none";
 | 
			
		||||
    pskReporterBandActivityDiv.style.display = "none";
 | 
			
		||||
    bandActivityDiv.style.display = "none";
 | 
			
		||||
    gtShareButton.style.display = "none";
 | 
			
		||||
    msgButton.style.display = "none";
 | 
			
		||||
    donateButton.style.display = "none";
 | 
			
		||||
| 
						 | 
				
			
			@ -2473,7 +2475,7 @@ function insertMessageInRoster(newMessage, msgDEcallsign, msgDXcallsign, callObj
 | 
			
		|||
  g_callRoster[hash].DXcall = msgDXcallsign;
 | 
			
		||||
  g_callRoster[hash].DEcall = msgDEcallsign;
 | 
			
		||||
 | 
			
		||||
  g_rosterUpdateTimer = nodeTimers.setTimeout(delayedRosterUpdate, 100);
 | 
			
		||||
  g_rosterUpdateTimer = nodeTimers.setTimeout(delayedRosterUpdate, 150);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function delayedRosterUpdate()
 | 
			
		||||
| 
						 | 
				
			
			@ -6236,6 +6238,8 @@ function handleWsjtxStatus(newMessage)
 | 
			
		|||
      addLastTraffic(msg);
 | 
			
		||||
      ackAlerts();
 | 
			
		||||
      updateChatWindow();
 | 
			
		||||
      oamsBandActivityCheck();
 | 
			
		||||
      g_gtLiveStatusUpdate = true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    myRawFreq = newMessage.Frequency;
 | 
			
		||||
| 
						 | 
				
			
			@ -6345,11 +6349,6 @@ function handleWsjtxStatus(newMessage)
 | 
			
		|||
 | 
			
		||||
        updateCountStats();
 | 
			
		||||
 | 
			
		||||
        if (g_appSettings.gtShareEnable == "true")
 | 
			
		||||
        {
 | 
			
		||||
          g_gtLiveStatusUpdate = true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (bandChange || modeChange) reloadInfo(bandChange || modeChange);
 | 
			
		||||
        var worker = "";
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -6497,6 +6496,15 @@ function handleWsjtxStatus(newMessage)
 | 
			
		|||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function reportDecodes()
 | 
			
		||||
{
 | 
			
		||||
  if (Object.keys(g_decodeCollector).length > 0)
 | 
			
		||||
  {
 | 
			
		||||
    gtChatSendDecodes(g_decodeCollector);
 | 
			
		||||
    g_decodeCollector = {};
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var g_lastMapView = null;
 | 
			
		||||
 | 
			
		||||
function drawTraffic()
 | 
			
		||||
| 
						 | 
				
			
			@ -6559,6 +6567,7 @@ function fitViewBetweenPoints(points, maxZoom = 20)
 | 
			
		|||
 | 
			
		||||
var g_spotCollector = {};
 | 
			
		||||
var g_spotDetailsCollector = {};
 | 
			
		||||
var g_decodeCollector = {};
 | 
			
		||||
 | 
			
		||||
function handleWsjtxDecode(newMessage)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -6902,16 +6911,23 @@ function handleWsjtxDecode(newMessage)
 | 
			
		|||
        lastMessageWasInfo = true;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (g_appSettings.gtSpotEnable === true && callsign.DEcall in g_gtCallsigns)
 | 
			
		||||
      if (g_appSettings.gtSpotEnable == true && newMessage.OF > 0)
 | 
			
		||||
      {
 | 
			
		||||
        for (const cid in g_gtCallsigns[callsign.DEcall])
 | 
			
		||||
        let freq = callsign.delta + newMessage.OF;
 | 
			
		||||
        if (callsign.DEcall in g_gtCallsigns)
 | 
			
		||||
        {
 | 
			
		||||
          if (cid in g_gtFlagPins && g_gtFlagPins[cid].o == 1)
 | 
			
		||||
          for (const cid in g_gtCallsigns[callsign.DEcall])
 | 
			
		||||
          {
 | 
			
		||||
            g_spotCollector[cid] = callsign.RSTsent;
 | 
			
		||||
            g_spotDetailsCollector[cid] = [callsign.delta + newMessage.OF, callsign.mode];
 | 
			
		||||
            if (cid in g_gtFlagPins && g_gtFlagPins[cid].o == 1)
 | 
			
		||||
            {
 | 
			
		||||
              g_spotCollector[cid] = callsign.RSTsent;
 | 
			
		||||
              g_spotDetailsCollector[cid] = [freq, callsign.mode];
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        freq = freq - (freq % k_frequencyBucket);
 | 
			
		||||
        g_decodeCollector[freq] ??= 0;
 | 
			
		||||
        g_decodeCollector[freq]++;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -10435,6 +10451,9 @@ function setGtShareButtons()
 | 
			
		|||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    g_oamsBandActivityData = null;
 | 
			
		||||
    renderBandActivity();
 | 
			
		||||
 | 
			
		||||
    msgButton.style.display = "none";
 | 
			
		||||
    gtFlagButton.style.display = "none";
 | 
			
		||||
    g_layerVectors.gtflags.setVisible(false);
 | 
			
		||||
| 
						 | 
				
			
			@ -10517,9 +10536,38 @@ function setGTspotEnable(checkbox)
 | 
			
		|||
{
 | 
			
		||||
  g_appSettings.gtSpotEnable = checkbox.checked;
 | 
			
		||||
 | 
			
		||||
  if (g_appSettings.gtSpotEnable == false)
 | 
			
		||||
  {
 | 
			
		||||
    g_spotCollector = {};
 | 
			
		||||
    g_spotDetailsCollector = {};
 | 
			
		||||
    g_decodeCollector = {};
 | 
			
		||||
  }
 | 
			
		||||
  g_gtLiveStatusUpdate = true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setOamsBandActivity(checkbox)
 | 
			
		||||
{
 | 
			
		||||
  g_appSettings.oamsBandActivity = checkbox.checked;
 | 
			
		||||
 | 
			
		||||
  if (g_appSettings.oamsBandActivity == false)
 | 
			
		||||
  {
 | 
			
		||||
    bandActivityNeighborDiv.style.display = "none";
 | 
			
		||||
    g_oamsBandActivityData = null;
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    bandActivityNeighborDiv.style.display = "";
 | 
			
		||||
    oamsBandActivityCheck();
 | 
			
		||||
  }
 | 
			
		||||
  renderBandActivity();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setOamsBandActivityNeighbors(checkbox)
 | 
			
		||||
{
 | 
			
		||||
  g_appSettings.oamsBandActivityNeighbors = checkbox.checked;
 | 
			
		||||
  oamsBandActivityCheck();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setMsgEnable(checkbox)
 | 
			
		||||
{
 | 
			
		||||
  g_appSettings.gtMsgEnable = checkbox.checked;
 | 
			
		||||
| 
						 | 
				
			
			@ -10579,58 +10627,54 @@ function downloadAcknowledgements()
 | 
			
		|||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var g_non_us_bands = [
 | 
			
		||||
  "630m",
 | 
			
		||||
  "160m",
 | 
			
		||||
  "80m",
 | 
			
		||||
  "60m",
 | 
			
		||||
  "40m",
 | 
			
		||||
  "30m",
 | 
			
		||||
  "20m",
 | 
			
		||||
  "17m",
 | 
			
		||||
  "15m",
 | 
			
		||||
  "12m",
 | 
			
		||||
  "10m",
 | 
			
		||||
  "6m",
 | 
			
		||||
  "4m",
 | 
			
		||||
  "2m"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
var g_us_bands = [
 | 
			
		||||
  "630m",
 | 
			
		||||
  "160m",
 | 
			
		||||
  "80m",
 | 
			
		||||
  "60m",
 | 
			
		||||
  "40m",
 | 
			
		||||
  "30m",
 | 
			
		||||
  "20m",
 | 
			
		||||
  "17m",
 | 
			
		||||
  "15m",
 | 
			
		||||
  "12m",
 | 
			
		||||
  "10m",
 | 
			
		||||
  "6m",
 | 
			
		||||
  "2m"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
function renderBandActivity()
 | 
			
		||||
{
 | 
			
		||||
  var buffer = "";
 | 
			
		||||
  if (typeof g_bandActivity.lines[myMode] != "undefined")
 | 
			
		||||
  if (typeof g_bandActivity.lines[myMode] != "undefined" || g_oamsBandActivityData != null)
 | 
			
		||||
  {
 | 
			
		||||
    var lines = g_bandActivity.lines[myMode];
 | 
			
		||||
 | 
			
		||||
    var bands = [
 | 
			
		||||
      "630m",
 | 
			
		||||
      "160m",
 | 
			
		||||
      "80m",
 | 
			
		||||
      "60m",
 | 
			
		||||
      "40m",
 | 
			
		||||
      "30m",
 | 
			
		||||
      "20m",
 | 
			
		||||
      "17m",
 | 
			
		||||
      "15m",
 | 
			
		||||
      "12m",
 | 
			
		||||
      "10m",
 | 
			
		||||
      "6m",
 | 
			
		||||
      "4m",
 | 
			
		||||
      "2m"
 | 
			
		||||
    ];
 | 
			
		||||
    if (g_myDXCC in g_callsignDatabaseUSplus)
 | 
			
		||||
    {
 | 
			
		||||
      bands = [
 | 
			
		||||
        "630m",
 | 
			
		||||
        "160m",
 | 
			
		||||
        "80m",
 | 
			
		||||
        "60m",
 | 
			
		||||
        "40m",
 | 
			
		||||
        "30m",
 | 
			
		||||
        "20m",
 | 
			
		||||
        "17m",
 | 
			
		||||
        "15m",
 | 
			
		||||
        "12m",
 | 
			
		||||
        "10m",
 | 
			
		||||
        "6m",
 | 
			
		||||
        "2m"
 | 
			
		||||
      ];
 | 
			
		||||
    }
 | 
			
		||||
    var lines = (myMode in g_bandActivity.lines) ? g_bandActivity.lines[myMode] : [];
 | 
			
		||||
    var bands = (g_myDXCC in g_callsignDatabaseUSplus) ? g_us_bands : g_non_us_bands;
 | 
			
		||||
    var bandData = {};
 | 
			
		||||
    var maxValue = 0;
 | 
			
		||||
 | 
			
		||||
    for (var i = 0; i < bands.length; i++)
 | 
			
		||||
    {
 | 
			
		||||
      bandData[bands[i]] = {};
 | 
			
		||||
 | 
			
		||||
      bandData[bands[i]].score = 0;
 | 
			
		||||
      bandData[bands[i]].spots = 0;
 | 
			
		||||
      bandData[bands[i]].tx = 0;
 | 
			
		||||
      bandData[bands[i]].rx = 0;
 | 
			
		||||
      bandData[bands[i]] = { pskScore: 0, pskSpots: 0, pskTx: 0, pskRx: 0, oamsRxSpots: 0, oamsTxSpots: 0, oamsTx: 0, oamsRx: 0, oamsDecodes: 0, oamsScore: 0 };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (var x = 0; x < lines.length; x++)
 | 
			
		||||
    {
 | 
			
		||||
      var firstChar = lines[x].charCodeAt(0);
 | 
			
		||||
| 
						 | 
				
			
			@ -10644,53 +10688,74 @@ function renderBandActivity()
 | 
			
		|||
        {
 | 
			
		||||
          var place = bandData[band];
 | 
			
		||||
 | 
			
		||||
          place.score += Number(values[1]);
 | 
			
		||||
          place.spots += Number(values[2]);
 | 
			
		||||
          place.tx += Number(values[3]);
 | 
			
		||||
          place.rx += Number(values[4]);
 | 
			
		||||
          if (maxValue < place.score) maxValue = place.score;
 | 
			
		||||
          if (maxValue < place.spots) maxValue = place.spots;
 | 
			
		||||
          place.pskScore += Number(values[1]);
 | 
			
		||||
          place.pskSpots += Number(values[2]);
 | 
			
		||||
          place.pskTx += Number(values[3]);
 | 
			
		||||
          place.pskRx += Number(values[4]);
 | 
			
		||||
          if (maxValue < place.pskScore) maxValue = place.pskScore;
 | 
			
		||||
          if (maxValue < place.pskSpots) maxValue = place.pskSpots;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var scaleFactor = 1.0;
 | 
			
		||||
    if (g_appSettings.gtShareEnable == true && g_appSettings.oamsBandActivity == true && g_oamsBandActivityData)
 | 
			
		||||
    {
 | 
			
		||||
      for (const grid in g_oamsBandActivityData)
 | 
			
		||||
      {
 | 
			
		||||
        for (const band in g_oamsBandActivityData[grid])
 | 
			
		||||
        {
 | 
			
		||||
          if (band in bandData)
 | 
			
		||||
          {
 | 
			
		||||
            var place = bandData[band];
 | 
			
		||||
 | 
			
		||||
            place.oamsDecodes += g_oamsBandActivityData[grid][band].d;
 | 
			
		||||
            place.oamsRxSpots += g_oamsBandActivityData[grid][band].rS;
 | 
			
		||||
            place.oamsTxSpots += g_oamsBandActivityData[grid][band].tS;
 | 
			
		||||
            place.oamsTx += g_oamsBandActivityData[grid][band].t;
 | 
			
		||||
            place.oamsRx += g_oamsBandActivityData[grid][band].r
 | 
			
		||||
 | 
			
		||||
            if (place.oamsRx > 0)
 | 
			
		||||
            {
 | 
			
		||||
              place.oamsScore = parseInt((place.oamsDecodes > place.oamsRxSpots) ? ((place.oamsDecodes - place.oamsRxSpots) / place.oamsRx) + (place.oamsTxSpots * place.oamsTx) : (place.oamsRxSpots / place.oamsRx) + (place.oamsTxSpots * place.oamsTx));
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
              place.oamsScore = parseInt(place.oamsTxSpots * place.oamsTx);
 | 
			
		||||
            }
 | 
			
		||||
            if (maxValue < place.oamsScore) maxValue = place.oamsScore;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    let scaleFactor = 1.0;
 | 
			
		||||
    if (maxValue > 26)
 | 
			
		||||
    {
 | 
			
		||||
      scaleFactor = 26 / maxValue;
 | 
			
		||||
    }
 | 
			
		||||
    for (var band in bandData)
 | 
			
		||||
    for (const band in bandData)
 | 
			
		||||
    {
 | 
			
		||||
      var blockMyBand = "";
 | 
			
		||||
      if (band == myBand) blockMyBand = " class='myBand' ";
 | 
			
		||||
      let blockMyBand = (band == myBand) ? " class='myBand' " : "";
 | 
			
		||||
      let title;
 | 
			
		||||
      let blueBarValue;
 | 
			
		||||
 | 
			
		||||
      var title =
 | 
			
		||||
        "Score: " +
 | 
			
		||||
        bandData[band].score +
 | 
			
		||||
        " Spots: " +
 | 
			
		||||
        bandData[band].spots +
 | 
			
		||||
        "\nTx: " +
 | 
			
		||||
        bandData[band].tx +
 | 
			
		||||
        "\tRx: " +
 | 
			
		||||
        bandData[band].rx;
 | 
			
		||||
      buffer +=
 | 
			
		||||
        "<div title='" +
 | 
			
		||||
        title +
 | 
			
		||||
        "' style='display:inline-block;margin:1px;' class='aBand'>";
 | 
			
		||||
      buffer +=
 | 
			
		||||
        "<div style='height: " +
 | 
			
		||||
        (bandData[band].score * scaleFactor + 1) +
 | 
			
		||||
        "px;' class='barTx'></div>";
 | 
			
		||||
      buffer +=
 | 
			
		||||
        "<div style='height: " +
 | 
			
		||||
        (bandData[band].spots * scaleFactor + 1) +
 | 
			
		||||
        "px;' class='barRx'></div>";
 | 
			
		||||
      buffer +=
 | 
			
		||||
        "<div style='font-size:10px' " +
 | 
			
		||||
        blockMyBand +
 | 
			
		||||
        ">" +
 | 
			
		||||
        parseInt(band) +
 | 
			
		||||
        "</div>";
 | 
			
		||||
      if (g_appSettings.gtShareEnable == true && g_appSettings.oamsBandActivity == true)
 | 
			
		||||
      {
 | 
			
		||||
        title = "OAMS\n";
 | 
			
		||||
        title += "\tScore: " + bandData[band].oamsScore + "\n\tDecodes: " + bandData[band].oamsDecodes + "\n\tTX-Spots: " + bandData[band].oamsTxSpots + "\n\tRX-Spots: " + bandData[band].oamsRxSpots + "\n\tTx: " + bandData[band].oamsTx + "\tRx: " + bandData[band].oamsRx;
 | 
			
		||||
        title += "\nPSK-Reporter\n";
 | 
			
		||||
        title += "\tScore: " + bandData[band].pskScore + "\n\tSpots: " + bandData[band].pskSpots + "\n\tTx: " + bandData[band].pskTx + "\tRx: " + bandData[band].pskRx;
 | 
			
		||||
        blueBarValue = (bandData[band].oamsScore * scaleFactor + 1);
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
      {
 | 
			
		||||
        title = "Score: " + bandData[band].pskScore + "\nSpots: " + bandData[band].pskSpots + "\nTx: " + bandData[band].pskTx + "\tRx: " + bandData[band].pskRx;
 | 
			
		||||
        blueBarValue = (bandData[band].pskSpots * scaleFactor + 1);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      buffer += "<div title='" + title + "' style='display:inline-block;margin:1px;' class='aBand'>";
 | 
			
		||||
      buffer += "<div style='height: " + (bandData[band].pskScore * scaleFactor + 1) + "px;' class='barTx'></div>"; buffer += "<div style='height: " + blueBarValue + "px;' class='barRx'></div>";
 | 
			
		||||
      buffer += "<div style='font-size:10px' " + blockMyBand + ">" + parseInt(band) + "</div>";
 | 
			
		||||
      buffer += "</div>";
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -10699,7 +10764,7 @@ function renderBandActivity()
 | 
			
		|||
    buffer = "..no data yet..";
 | 
			
		||||
  }
 | 
			
		||||
  graphDiv.innerHTML = buffer;
 | 
			
		||||
  if (g_baWindowHandle)
 | 
			
		||||
  if (g_baWindowInitialized == true)
 | 
			
		||||
  {
 | 
			
		||||
    g_baWindowHandle.window.graphDiv.innerHTML = buffer;
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -10733,11 +10798,7 @@ function pskGetBandActivity()
 | 
			
		|||
    g_bandActivity.lastUpdate[myMode] = 0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (
 | 
			
		||||
    myMode.length > 0 &&
 | 
			
		||||
    myDEGrid.length > 0 &&
 | 
			
		||||
    g_timeNow > g_bandActivity.lastUpdate[myMode]
 | 
			
		||||
  )
 | 
			
		||||
  if (myMode.length > 0 && myDEGrid.length > 0 && g_timeNow > g_bandActivity.lastUpdate[myMode])
 | 
			
		||||
  {
 | 
			
		||||
    getBuffer(
 | 
			
		||||
      "https://pskreporter.info/cgi-bin/psk-freq.pl?mode=" +
 | 
			
		||||
| 
						 | 
				
			
			@ -12827,6 +12888,10 @@ function loadMsgSettings()
 | 
			
		|||
  msgEnable.checked = g_appSettings.gtMsgEnable;
 | 
			
		||||
  GTspotEnable.checked = g_appSettings.gtSpotEnable;
 | 
			
		||||
 | 
			
		||||
  oamsBandActivity.checked = g_appSettings.oamsBandActivity;
 | 
			
		||||
  oamsBandActivityNeighbors.checked = g_appSettings.oamsBandActivityNeighbors;
 | 
			
		||||
  setOamsBandActivity(oamsBandActivity);
 | 
			
		||||
 | 
			
		||||
  setSpotImage();
 | 
			
		||||
 | 
			
		||||
  for (var key in g_msgSettings)
 | 
			
		||||
| 
						 | 
				
			
			@ -13032,7 +13097,7 @@ function startupButtonsAndInputs()
 | 
			
		|||
      gtShareButton.style.display = "none";
 | 
			
		||||
      msgButton.style.display = "none";
 | 
			
		||||
      donateButton.style.display = "none";
 | 
			
		||||
      pskReporterBandActivityDiv.style.display = "none";
 | 
			
		||||
      bandActivityDiv.style.display = "none";
 | 
			
		||||
      buttonSpotsBoxDiv.style.display = "none";
 | 
			
		||||
      potaButton.style.display = "none";
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -13052,6 +13117,8 @@ function startupEventsAndTimers()
 | 
			
		|||
 | 
			
		||||
  // Clock timer update every second
 | 
			
		||||
  nodeTimers.setInterval(displayTime, 1000);
 | 
			
		||||
  nodeTimers.setInterval(reportDecodes, 60000);
 | 
			
		||||
  nodeTimers.setInterval(oamsBandActivityCheck, 300000);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var g_finishedLoading = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -13610,6 +13677,7 @@ function updateWsjtxListener(port)
 | 
			
		|||
          newMessage.OG = g_instances[instanceId].status.DEgrid;
 | 
			
		||||
          newMessage.OM = g_instances[instanceId].status.MO;
 | 
			
		||||
          newMessage.OB = g_instances[instanceId].status.Band;
 | 
			
		||||
          newMessage.SP = g_instances[instanceId].status.SopMode;
 | 
			
		||||
        }
 | 
			
		||||
        if (newMessage.type == 3)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,8 @@ var g_chatRecvFunctions = {
 | 
			
		|||
  info: gtChatUpdateCall,
 | 
			
		||||
  drop: gtChatRemoveCall,
 | 
			
		||||
  mesg: gtChatMessage,
 | 
			
		||||
  o: gtSpotMessage
 | 
			
		||||
  o: gtSpotMessage,
 | 
			
		||||
  ba: bandActivityReply
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var ChatState = Object();
 | 
			
		||||
| 
						 | 
				
			
			@ -48,6 +49,7 @@ var g_gtNeedUsersList = true;
 | 
			
		|||
var g_gtUuidValid = false;
 | 
			
		||||
 | 
			
		||||
var g_gtLiveStatusUpdate = false;
 | 
			
		||||
var g_oamsBandActivityData = null;
 | 
			
		||||
 | 
			
		||||
var myChatId = 0;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -213,7 +215,7 @@ function gtStatusCheck()
 | 
			
		|||
 | 
			
		||||
function sendGtJson(json, isUUIDrequest = false)
 | 
			
		||||
{
 | 
			
		||||
  if (g_gtChatSocket != null)
 | 
			
		||||
  if (g_appSettings.gtShareEnable == true && g_gtChatSocket != null)
 | 
			
		||||
  {
 | 
			
		||||
    if (g_gtChatSocket.readyState === WebSocket.OPEN && (isUUIDrequest || g_gtUuidValid))
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			@ -227,8 +229,6 @@ function sendGtJson(json, isUUIDrequest = false)
 | 
			
		|||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  // if we don't have a socketHandle, don't go changing the state willy nilly!
 | 
			
		||||
  // else g_gtState = ChatState.closed;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var g_lastGtStatus = "";
 | 
			
		||||
| 
						 | 
				
			
			@ -258,13 +258,53 @@ function gtChatSendStatus()
 | 
			
		|||
 | 
			
		||||
function gtChatSendSpots(spotsObject, detailsObject)
 | 
			
		||||
{
 | 
			
		||||
  var msg = Object();
 | 
			
		||||
  let msg = Object();
 | 
			
		||||
  msg.type = "o";
 | 
			
		||||
  msg.uuid = g_appSettings.chatUUID;
 | 
			
		||||
  msg.o = spotsObject;
 | 
			
		||||
  msg.d = detailsObject;
 | 
			
		||||
  msg = JSON.stringify(msg);
 | 
			
		||||
  sendGtJson(msg);
 | 
			
		||||
 | 
			
		||||
  sendGtJson(JSON.stringify(msg));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function gtChatSendDecodes(instancesObject)
 | 
			
		||||
{
 | 
			
		||||
  let msg = Object();
 | 
			
		||||
  msg.type = "d";
 | 
			
		||||
  msg.uuid = g_appSettings.chatUUID;
 | 
			
		||||
  msg.i = instancesObject;
 | 
			
		||||
  sendGtJson(JSON.stringify(msg));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function oamsBandActivityCheck()
 | 
			
		||||
{
 | 
			
		||||
  if (g_appSettings.oamsBandActivity == true && myDEGrid.length >= 4)
 | 
			
		||||
  {
 | 
			
		||||
    let grid = myDEGrid.substring(0, 4).toUpperCase();
 | 
			
		||||
    if (g_appSettings.oamsBandActivityNeighbors == true)
 | 
			
		||||
    {
 | 
			
		||||
      gtChatSendBandActivityRequest(squareToNeighbors(grid));
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
      gtChatSendBandActivityRequest([grid]);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function gtChatSendBandActivityRequest(gridArray)
 | 
			
		||||
{
 | 
			
		||||
  msg = Object();
 | 
			
		||||
  msg.type = "ba";
 | 
			
		||||
  msg.uuid = g_appSettings.chatUUID;
 | 
			
		||||
  msg.ga = gridArray;
 | 
			
		||||
  sendGtJson(JSON.stringify(msg));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function bandActivityReply(jsmesg)
 | 
			
		||||
{
 | 
			
		||||
  g_oamsBandActivityData = jsmesg.r;
 | 
			
		||||
  renderBandActivity();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function gtChatRemoveCall(jsmesg)
 | 
			
		||||
| 
						 | 
				
			
			@ -369,7 +409,7 @@ function gtChatUpdateCall(jsmesg)
 | 
			
		|||
  if (!(g_gtFlagPins[cid].call in g_gtCallsigns))
 | 
			
		||||
  {
 | 
			
		||||
    // Can happen when a user changes callsign
 | 
			
		||||
    g_gtCallsigns[g_gtFlagPins[cid].call] = Object();
 | 
			
		||||
    g_gtCallsigns[g_gtFlagPins[cid].call] = {};
 | 
			
		||||
  }
 | 
			
		||||
  g_gtCallsigns[g_gtFlagPins[cid].call][cid] = true;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -500,6 +540,8 @@ function gtChatNewList(jsmesg)
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  updateChatWindow();
 | 
			
		||||
 | 
			
		||||
  oamsBandActivityCheck();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function appendToHistory(cid, jsmesg)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -420,15 +420,7 @@ function fillObjectFromTemplate(template, input)
 | 
			
		|||
 | 
			
		||||
function uniqueArrayFromArray(input)
 | 
			
		||||
{
 | 
			
		||||
  var unique = [];
 | 
			
		||||
  input.forEach((c) =>
 | 
			
		||||
  {
 | 
			
		||||
    if (!unique.includes(c))
 | 
			
		||||
    {
 | 
			
		||||
      unique.push(c);
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
  return unique;
 | 
			
		||||
  return [...new Set(input)];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function processPotaSpots(buffer)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue