|
@ -22,7 +22,7 @@
|
|||
<script src="./lib/gt.js" type="text/javascript"></script>
|
||||
<script src="./lib/screens.js"></script>
|
||||
</head>
|
||||
<body id='mainBody' onload="init();" >
|
||||
<body id='mainBody' onload="initialDatabases();" >
|
||||
<div id="startupDiv">
|
||||
<div class="fill">
|
||||
<img src="gridview.png" alt="" />
|
||||
|
@ -266,7 +266,7 @@
|
|||
<div id="buttonsDiv" style="margin-left:0px;white-space:normal;">
|
||||
<div id="callRosterButton" class="iconButton" style="padding:0px;" onclick="openCallRosterWindow();" title="Open Call Roster" ><img src="./img/roster-button.svg" class="buttonImgWide" /></div>
|
||||
<div id="pushPinButton" onclick="togglePushPinMode();" class="iconButton" title="Toggle Push-Pin Mode"><img id="pinImg" src="" class="buttonImg" /></div>
|
||||
<div id="lookupButton" onclick="openLookupWindow()" class="iconButton" title="Open Lookup Window" ><img style="" src="./img/lookup.svg" class="buttonImg" /></div>
|
||||
<div id="lookupButton" onclick="openLookupWindow(true)" class="iconButton" title="Open Lookup Window" ><img style="" src="./img/lookup.svg" class="buttonImg" /></div>
|
||||
<div id="statsDiv" onclick="showRootInfoBox();" class="iconButton" title="Show Stats"><img src="./img/stats-button.svg" class="buttonImg" /></div>
|
||||
<div id="modeModeDiv" onclick="toggleOffline()" class="iconButton" title="Toggle Online/Offline Mode"><img id="offlineImg" src="" class="buttonImg" /></div>
|
||||
<div id="earthShadow" onclick="toggleEarth()" class="iconButton" title="Toggle Grayline"><img id="earthImg" src="" class="buttonImg" /></div>
|
||||
|
@ -280,7 +280,7 @@
|
|||
<div id="settingsButton" onclick="showSettingsBox();" class="iconButton" title="Settings"><img src="./img/settings-button.svg" class="buttonImg" /></div>
|
||||
<div id="adifLoadDiv" onclick="adifLoadDialog()" class="iconButton" title="Load ADIF Log"><img src="./img/adif.png" class="buttonImg" /></div>
|
||||
<div id="conditionsButton" onclick="showConditionsBox();" class="iconButton" title="View Current Conditions" ><img src="./img/conditions.svg" class="buttonImg" /></div>
|
||||
<div id="donateButton" onclick="gotoDonate();" class="iconButton" title="Donate with PayPal"><img style="-webkit-filter: invert(1) brightness(50%);" src="./img/heart.png" class="buttonImg" /></div>
|
||||
<div id="donateButton" onclick="gotoDonate();" class="iconButton" title="Donate with PayPal"><img style="-webkit-filter: brightness(50%);" src="./img/donate.svg" class="buttonImg" /></div>
|
||||
<div id="alterMuteDiv" onclick="toggleAlertMute()" class="iconButton" title="Toggle Audio Mute" ><img id="alertMuteImg" src="" class="buttonImg" /></div>
|
||||
<div id="buttonPSKSpotsBoxDiv" onClick="togglePskSpots();" class="iconButton" title="View PSK-Reporter Reception Reports"><img id="pskSpotsImg" src="./img/psk_spots_off.png" class="buttonImg" /></div>
|
||||
<div id="buttonPsk24CheckBoxDiv" onclick="grabPsk24()" class="iconButton" title="Your PSK 24hour report"><img id="pskImg" src="./img/psk_24_32.png" class="buttonImg" /></div>
|
||||
|
@ -362,7 +362,7 @@
|
|||
<button class="settingsTablinks" onclick="openSettingsTab(event, 'callRosterDiv')">Call Roster</button>
|
||||
<button class="settingsTablinks" onclick="openSettingsTab(event, 'chatSettingsDiv')">Messaging</button>
|
||||
<button id="logbut" class="settingsTablinks" onclick="openSettingsTab(event, 'logbookSettingsDiv')">Logbook</button>
|
||||
<button id="update" class="settingsTablinks" onclick="openSettingsTab(event, 'updateSettingsDiv')">Update</button>
|
||||
<button id="updatebut" class="settingsTablinks" onclick="openSettingsTab(event, 'updateSettingsDiv')">Update</button>
|
||||
<button class="settingsTablinks" style="margin-right:25px;" onclick="openSettingsTab(event, 'aboutDiv')">About</button>
|
||||
</div>
|
||||
<div id="udpSettingsDiv" class="settingsTabcontent" style="display:block;vertical-align:top">
|
||||
|
@ -999,6 +999,30 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div><br/>
|
||||
<div class="mapItem" id="spotPathWidthDiv">
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="center">PSK-Spot Path Width</td>
|
||||
<td align="left" id="spotWidthTd">1.5</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td colspan=2><input type="range" min="0.0" max="5" value="1.5" step="0.05" class="slider" id="spotWidthValue" oninput="spotPathChange();" onkeyup="redrawSpots();" onmouseup="redrawSpots();"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mapItem" >
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="center" colspan=2>Map Settings Transparency</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" id="mapTransTd">50%</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td colspan=2><input type="range" min="0" max="1" value="0.5" step="0.01" class="slider" id="mapTransValue" oninput="mapTransChange();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mapItem">
|
||||
<table align="center">
|
||||
<tr >
|
||||
|
@ -1071,17 +1095,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mapItem" id="spotPathWidthDiv">
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="center">PSK-Spot Path Width</td>
|
||||
<td align="left" id="spotWidthTd">1.5</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td colspan=2><input type="range" min="0.0" max="5" value="1.5" step="0.05" class="slider" id="spotWidthValue" oninput="spotPathChange();" onkeyup="redrawSpots();" onmouseup="redrawSpots();"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1354,8 +1368,8 @@
|
|||
</div>
|
||||
<br/>
|
||||
<div class="mapItem">
|
||||
<table align="center">
|
||||
<tr><td colspan=2>Audio Alert On New Hits</td></td>
|
||||
<table align="center" title="Alert when new 'Wanted Row(s)' appear in the Call Roster">
|
||||
<tr><td colspan=2>Audio Alert On <b>New Wanted</b></td></td>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<input type="checkbox" id="huntRoster" onchange="wantedChanged(this);"/>
|
||||
|
@ -1756,7 +1770,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="updateSettingsDiv" class="settingsTabcontent">
|
||||
<div style="left:0;overflow:auto;display:inline-block;height:510px;width:740px;padding:4px;text-align:left;font-size:14px;" id="updateText" >
|
||||
<div style="left:0;display:inline-block;height:510px;width:740px;" id="updateText" >
|
||||
<embed src="./gt_update.pdf" style="width: 100%; height: 100%;" frameborder="0" scrolling="yes" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="top:0;right:1px;position:absolute">
|
||||
|
|
|
@ -68,7 +68,8 @@
|
|||
"url": "/map/toner-background/{z}/{x}/{y}.png",
|
||||
"attributions": "Stamen Design",
|
||||
"minZoom": 0,
|
||||
"maxZoom": 6
|
||||
"maxZoom": 5,
|
||||
"offline": true
|
||||
}
|
||||
,
|
||||
{
|
||||
|
@ -256,5 +257,14 @@
|
|||
"attributions": "© Carto",
|
||||
"maxZoom": 19
|
||||
|
||||
},
|
||||
{
|
||||
"name": "Satellite by MapTiler (No Labels)(Offline)",
|
||||
"url": "/map/sat/{z}/{x}/{y}.png",
|
||||
"attributions": "MapTiler",
|
||||
"minZoom": 0,
|
||||
"maxZoom": 5,
|
||||
"offline": true
|
||||
}
|
||||
|
||||
]
|
|
@ -5,8 +5,9 @@
|
|||
<title>Band Activity</title>
|
||||
<link rel="stylesheet" href="./lib/style.css"/>
|
||||
<script src="./lib/protos.js" type="text/javascript" ></script>
|
||||
<script src="./lib/screens.js" type="text/javascript" ></script>
|
||||
<script>
|
||||
var g_isShowing = true;
|
||||
|
||||
|
||||
|
||||
document.addEventListener("dragover", function (event) {
|
||||
|
@ -17,26 +18,13 @@ document.addEventListener("drop", function (event) {
|
|||
event.preventDefault();
|
||||
});
|
||||
|
||||
var g_menu = null;
|
||||
|
||||
g_menu = new nw.Menu();
|
||||
// Bind a callback to item
|
||||
var item = new nw.MenuItem({
|
||||
type: "normal",
|
||||
label: "Close Widget",
|
||||
click: function() {
|
||||
document.addEventListener('contextmenu', function(ev) {
|
||||
window.opener.openBaWindow(false);
|
||||
}
|
||||
});
|
||||
g_menu.append(item);
|
||||
|
||||
|
||||
document.body.addEventListener('contextmenu', function(ev) {
|
||||
ev.preventDefault();
|
||||
window.opener.openBaWindow(false);
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<script src="./lib/screens.js"></script>
|
||||
</head>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;width:100%" >
|
||||
<head >
|
||||
<title>GridTracker : Off-Air Message Service (OAMS)</title>
|
||||
<title>Off-Air Message Service (OAMS)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="./lib/style.css">
|
||||
<style type="text/css">
|
||||
|
@ -212,8 +212,7 @@ function init()
|
|||
Resize();
|
||||
}
|
||||
showAllCallsigns();
|
||||
|
||||
document.addEventListener('keydown', onMyKeyDown, false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -610,33 +609,7 @@ function doLookup(what )
|
|||
}
|
||||
|
||||
|
||||
var g_hotKeys = { "NumpadSubtract":reduceFont , "Minus":reduceFont , "NumpadAdd":increaseFont, "Equal":increaseFont, "Numpad0":resetFont , "Digit0":resetFont };
|
||||
|
||||
function onMyKeyDown(event)
|
||||
{
|
||||
if ( event.ctrlKey )
|
||||
{
|
||||
if ( event.code in g_hotKeys )
|
||||
{
|
||||
g_hotKeys[event.code]();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reduceFont()
|
||||
{
|
||||
nw.Window.get().zoomLevel-=0.1;
|
||||
}
|
||||
|
||||
function increaseFont()
|
||||
{
|
||||
nw.Window.get().zoomLevel+=0.1;
|
||||
}
|
||||
|
||||
function resetFont()
|
||||
{
|
||||
nw.Window.get().zoomLevel = 0;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head >
|
||||
<title>GridTracker - Current Conditions</title>
|
||||
<title>Current Conditions</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="./lib/style.css">
|
||||
<style type="text/css">
|
||||
body,html {
|
||||
-webkit-appearance: none;
|
||||
-webkit-user-select: none;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
-webkit-appearance: none;
|
||||
-webkit-user-select: none;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
color:#FFF;
|
||||
white-space: nowrap;
|
||||
font-family:Sans-Serif;
|
||||
font-size: 12px;
|
||||
text-align:center;
|
||||
color:#FFF;
|
||||
white-space: nowrap;
|
||||
font-family:Sans-Serif;
|
||||
font-size: 12px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
@ -27,11 +27,11 @@ document.oncontextmenu = function() {
|
|||
}
|
||||
|
||||
document.addEventListener("dragover", function (event) {
|
||||
event.preventDefault();
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
document.addEventListener("drop", function (event) {
|
||||
event.preventDefault();
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
function lockNewWindows()
|
||||
|
@ -55,64 +55,17 @@ function timeNowSec()
|
|||
function showConditionsBox()
|
||||
{
|
||||
var now = timeNowSec() % 86400;
|
||||
conditionsDataDiv.innerHTML =
|
||||
"<div> \
|
||||
<a target='_blank' href='http://www.hamqsl.com' title='Visit www.hamqsl.net'><img src='http://www.hamqsl.com/solar101vhf.php?cb=" +
|
||||
now +
|
||||
"'></a> \
|
||||
</div> \
|
||||
<div > \
|
||||
<table align='center'>\
|
||||
<tr>\
|
||||
<td>\
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_304/512/latest.jpg?cb=" +
|
||||
now +
|
||||
"' class='solarImg'>\
|
||||
</td>\
|
||||
<td>\
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_171/512/latest.jpg?cb=" +
|
||||
now +
|
||||
"' class='solarImg'>\
|
||||
</td>\
|
||||
<td>\
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_195/512/latest.jpg?cb=" +
|
||||
now +
|
||||
"' class='solarImg'>\
|
||||
</td>\
|
||||
<td>\
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_284/512/latest.jpg?cb=" +
|
||||
+
|
||||
now +
|
||||
"' class='solarImg'>\
|
||||
</td>\
|
||||
<td>\
|
||||
<img src='https://sdo.gsfc.nasa.gov/assets/img/latest/f_304_211_171_256.jpg?cb=" +
|
||||
now +
|
||||
"' class='solarImg'>\
|
||||
</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td>\
|
||||
30.4nm\
|
||||
</td>\
|
||||
<td>\
|
||||
17.1nm\
|
||||
</td>\
|
||||
<td>\
|
||||
19.5nm\
|
||||
</td>\
|
||||
<td>\
|
||||
28.4nm\
|
||||
</td>\
|
||||
<td>\
|
||||
304/211/171\
|
||||
</td>\
|
||||
</tr>\
|
||||
</table> \
|
||||
</div>\
|
||||
</div>";
|
||||
|
||||
|
||||
|
||||
var images = document.getElementsByTagName('img');
|
||||
|
||||
for(var i = 0; i < images.length; i++) {
|
||||
var parts = images[i].src.split("t=");
|
||||
images[i].src = parts[0] + "t=" + now;
|
||||
}
|
||||
|
||||
setTimeout(showConditionsBox,1800000);
|
||||
|
||||
}
|
||||
|
||||
function init()
|
||||
|
@ -121,19 +74,61 @@ function init()
|
|||
showConditionsBox();
|
||||
|
||||
document.addEventListener('keydown', onMyKeyDown, false);
|
||||
|
||||
}
|
||||
|
||||
function onMyKeyDown(event)
|
||||
{
|
||||
window.opener.onMyKeyDown(event);
|
||||
window.opener.onMyKeyDown(event);
|
||||
}
|
||||
</script>
|
||||
<script src="./lib/screens.js"></script>
|
||||
</head>
|
||||
<body style="margin:0;top:3px" onload="init();" >
|
||||
<div id="main" style="margin:0;top:0;min-height:60px;width:auto;background-color:black;padding:0px;text-align:center;vertical-align:middle;position:relative;white-space:nowrap;overflow:hidden;" >
|
||||
<div id="conditionsDataDiv" style="width:auto;display:none;background-color:black;padding:0px;text-align:center;vertical-align:middle;position:relative;z-index:600;white-space:nowrap;overflow:hidden;">
|
||||
|
||||
<div id="main" style="margin:0;top:0;min-height:60px;background-color:black;padding:0px;text-align:center;vertical-align:middle;position:relative;white-space:nowrap;overflow:hidden;" >
|
||||
<div id="conditionsDataDiv" >
|
||||
<div>
|
||||
<a target='_blank' href='http://www.hamqsl.com' title='Visit www.hamqsl.net'><img src='http://www.hamqsl.com/solar101vhf.php?t='></a>
|
||||
</div>
|
||||
<div >
|
||||
<table align='center'>
|
||||
<tr>
|
||||
<td>
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_304/512/latest.jpg?t=' class='solarImg'>
|
||||
</td>
|
||||
<td>
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_171/512/latest.jpg?t=' class='solarImg'>
|
||||
</td>
|
||||
<td>
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_195/512/latest.jpg?t=' class='solarImg'>
|
||||
</td>
|
||||
<td>
|
||||
<img src='https://sohowww.nascom.nasa.gov/data/realtime/eit_284/512/latest.jpg?t=' class='solarImg'>
|
||||
</td>
|
||||
<td>
|
||||
<img src='https://sdo.gsfc.nasa.gov/assets/img/latest/f_304_211_171_256.jpg?t=' class='solarImg'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
30.4nm
|
||||
</td>
|
||||
<td>
|
||||
17.1nm
|
||||
</td>
|
||||
<td>
|
||||
19.5nm
|
||||
</td>
|
||||
<td>
|
||||
28.4nm
|
||||
</td>
|
||||
<td>
|
||||
304/211/171
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
<html lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>GridTracker Callsign Lookup</title>
|
||||
<title>Callsign Lookup</title>
|
||||
<link rel="stylesheet" href="./lib/style.css"/>
|
||||
<script src="./lib/protos.js" type="text/javascript" ></script>
|
||||
<script src="./lib/screens.js"></script>
|
||||
<script>
|
||||
var g_isShowing = true;
|
||||
|
||||
document.oncontextmenu = function() {
|
||||
return false;
|
||||
|
@ -21,9 +20,9 @@ document.addEventListener("drop", function (event) {
|
|||
event.preventDefault();
|
||||
});
|
||||
|
||||
function lookupCallsign( callsign )
|
||||
function lookupCallsign( callsign, grid, cache )
|
||||
{
|
||||
window.opener.lookupCallsign(callsign);
|
||||
window.opener.lookupCallsign(callsign, grid, cache);
|
||||
}
|
||||
|
||||
function statsFocus( selection )
|
||||
|
@ -73,7 +72,6 @@ function validateCallByElement( elementString )
|
|||
function init()
|
||||
{
|
||||
ValidateCallsign(lookupCallsignInput, null);
|
||||
document.addEventListener('keydown', onMyKeyDown, false);
|
||||
}
|
||||
|
||||
function addTextToClipboard(data)
|
||||
|
@ -95,33 +93,7 @@ function Resize()
|
|||
}
|
||||
|
||||
|
||||
var g_hotKeys = { "NumpadSubtract":reduceFont , "Minus":reduceFont , "NumpadAdd":increaseFont, "Equal":increaseFont, "Numpad0":resetFont , "Digit0":resetFont };
|
||||
|
||||
function onMyKeyDown(event)
|
||||
{
|
||||
if ( event.ctrlKey )
|
||||
{
|
||||
if ( event.code in g_hotKeys )
|
||||
{
|
||||
g_hotKeys[event.code]();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reduceFont()
|
||||
{
|
||||
nw.Window.get().zoomLevel-=0.1;
|
||||
}
|
||||
|
||||
function increaseFont()
|
||||
{
|
||||
nw.Window.get().zoomLevel+=0.1;
|
||||
}
|
||||
|
||||
function resetFont()
|
||||
{
|
||||
nw.Window.get().zoomLevel = 0;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
@ -130,7 +102,7 @@ function resetFont()
|
|||
<div id="rootInfoDiv"style="margin:0px;right:0px;left:0px;bottom:0px;top:3px;display:block;background-color:black;padding:0px;text-align:center;vertical-align:middle;position:absolute;z-index:600;" class="roundBorder" >
|
||||
<div id="lookupBoxDiv" class="lookupContent" style="display:block;overflow:auto;overflow-x:hidden">
|
||||
<div >Callsign<input id="lookupCallsignInput" type="text" class="inputTextValue" size="12" onkeyup="if (event.keyCode === 13) lookupButtonID.click();" oninput="ValidateCallsign(this,null);" />
|
||||
<div id="lookupButtonID" title="Lookup Callsign" class="button" onclick="if ( ValidateCallsign(lookupCallsignInput,null) ) { lookupCallsign(lookupCallsignInput.value);}">Lookup</div>
|
||||
<div id="lookupButtonID" title="Lookup Callsign" class="button" onclick="if ( ValidateCallsign(lookupCallsignInput,null) ) { lookupCallsign(lookupCallsignInput.value, null, false);}">Lookup</div>
|
||||
</div>
|
||||
<div id="lookupLocalDiv"></div>
|
||||
<div id="lookupInfoDiv">No Callsign information to display<br/>try a lookup!</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head >
|
||||
<title>GridTracker Breakout</title>
|
||||
<title>Data Breakout</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="./lib/style.css">
|
||||
<style type="text/css">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;width:100%">
|
||||
<head >
|
||||
<title>GridTracker : Call Roster</title>
|
||||
<title>Call Roster</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="./lib/style.css">
|
||||
<link id="roster" rel="stylesheet" href="./lib/style_roster.css">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>GridTracker Statistics</title>
|
||||
<title>Statistics</title>
|
||||
<link rel="stylesheet" href="./lib/style.css"/>
|
||||
<script src="./lib/protos.js" type="text/javascript" ></script>
|
||||
<script src="./lib/stats.js"></script>
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
<center>
|
||||
<img src="./img/energy-star.svg" width="100px">
|
||||
<font size="larger">
|
||||
<p>
|
||||
<b>This is a bug fix and look-and-feel update.</b><p>
|
||||
|
||||
Documentation starting with a quick-start guide is being created right now by the document team!<p>
|
||||
|
||||
All feature requests will be added to the backlog.<p>
|
||||
We will prioritize them in our public #Round-Table room on our Discord server.<p>
|
||||
Here is a link to our Discord server. <a href="https://discord.gg/j9Cv9XU" target="_blank" style="font-weight:bold;color:cyan">Link</a><p>
|
||||
</font>
|
||||
<i>We recommend downloading the Discord app instead of using the browser.</i>
|
||||
</center>
|
||||
<pre>
|
||||
Fixes:
|
||||
Right-click on empty grid flickering
|
||||
|
||||
Update:
|
||||
Call Roster:
|
||||
Band and Mode columns added to the right-click menu
|
||||
when enabled columns remain sticky
|
||||
when not enabled columns appear automatically as needed
|
||||
|
||||
US Counties:
|
||||
Counties are "best guess" based on the zipcode of the station
|
||||
the roster will rotate in unworked then unconfirmed counties as needed
|
||||
until I can get a database of US Callsigns with county info
|
||||
|
||||
Window(s):
|
||||
For "Energy Star" complaint monitors that shutdown to save power
|
||||
position of window(s) restored on return of display
|
||||
does not work if you close GridTracker when a display is off
|
||||
|
||||
Lookups:
|
||||
Added "DXCC" worked/confirmed status by band below last "QSO" date
|
||||
|
||||
Lookup and Chat windows now scale too!
|
||||
ctrl-minus / ctrl-plus / reset with ctrl-zero
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Thank you for reading the entire update!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
crab-pot
|
||||
</pre>
|
||||
<center><img class="button" src="./img/tokens.jpg" width="400px"></center>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 300.346 300.346" style="enable-background:new 0 0 300.346 300.346;" xmlns="http://www.w3.org/2000/svg">
|
||||
<g style="" transform="matrix(1.000001, 0, 0, 1.036258, -0.000368, -10.142784)">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M296.725,153.904c-3.612-5.821-9.552-9.841-16.298-11.03c-6.753-1.189-13.704,0.559-19.14,4.835l-21.379,17.125 c-3.533-3.749-8.209-6.31-13.359-7.218c-6.746-1.189-13.703,0.559-19.1,4.805l-12.552,9.921h-32.236 c-5.152,0-10.302-1.238-14.892-3.579l-11.486-5.861c-9.678-4.937-20.537-7.327-31.385-6.908 c-15.046,0.579-29.449,6.497-40.554,16.666L2.455,229.328c-2.901,2.656-3.28,7.093-0.873,10.203l32.406,41.867 c1.481,1.913,3.714,2.933,5.983,2.933c1.374,0,2.762-0.374,4.003-1.151l38.971-24.37c2.776-1.736,5.974-2.654,9.249-2.654h90.429 c12.842,0,25.445-4.407,35.489-12.409l73.145-58.281C300.817,177.855,303.165,164.286,296.725,153.904z M216.812,174.294 c2.034-1.602,4.561-2.236,7.112-1.787c1.536,0.271,2.924,0.913,4.087,1.856l-12.645,10.129c-1.126-2.111-2.581-4.019-4.282-5.672 L216.812,174.294z M281.838,173.64l-73.147,58.282c-7.377,5.878-16.634,9.116-26.067,9.116H92.194 c-6.113,0-12.084,1.714-17.266,4.954l-33.17,20.743L17.799,235.78l56.755-51.969c8.468-7.753,19.45-12.267,30.924-12.708 c8.271-0.32,16.552,1.504,23.932,5.268l11.486,5.861c6.708,3.422,14.234,5.231,21.763,5.231h32.504 c4.278,0,7.757,3.48,7.757,7.758c0,4.105-3.21,7.507-7.308,7.745l-90.45,5.252c-4.169,0.242-7.352,3.817-7.11,7.985 c0.243,4.168,3.798,7.347,7.986,7.109l90.45-5.252c9.461-0.549,17.317-6.817,20.283-15.321l53.916-43.189 c2.036-1.602,4.566-2.237,7.114-1.787c2.551,0.449,4.708,1.909,6.074,4.111C286.277,165.745,285.402,170.801,281.838,173.64z" style="fill: rgb(255, 255, 255);"/>
|
||||
<path d="M 175.328 153.419 C 215.207 153.419 247.651 124.048 247.651 87.945 C 247.651 51.843 215.207 22.471 175.328 22.471 C 135.45 22.471 103.006 51.842 103.006 87.945 C 103.006 124.049 135.45 153.419 175.328 153.419 Z M 175.328 39.59 C 204.781 39.59 228.741 61.283 228.741 87.945 C 228.741 114.608 204.779 136.299 175.328 136.299 C 145.876 136.299 121.916 114.607 121.916 87.945 C 121.916 61.282 145.877 39.59 175.328 39.59 Z" style="fill: rgb(255, 255, 255);"/>
|
||||
<path d="M 173.378 103.686 C 170.576 103.686 167.602 103.067 165 101.944 C 163.396 101.25 161.526 101.208 159.875 101.825 C 158.194 102.452 156.88 103.7 156.269 105.244 L 156.013 105.889 C 154.925 108.644 156.269 111.698 159.141 112.992 C 161.803 114.193 165.062 115.06 168.393 115.463 L 168.393 117.91 C 168.393 121.095 171.256 123.686 174.86 123.686 C 178.38 123.686 181.242 121.094 181.242 117.91 L 181.242 114.787 C 189.637 112.492 195.022 106.247 195.022 98.723 C 195.022 88.356 186.575 83.907 179.232 81.197 C 171.284 78.219 170.688 76.917 170.688 75.27 C 170.688 73.104 172.769 71.808 176.256 71.808 C 178.811 71.808 181.113 72.222 183.297 73.077 C 184.89 73.699 186.652 73.703 188.258 73.087 C 189.859 72.473 191.131 71.277 191.748 69.803 L 192.002 69.19 C 193.216 66.292 191.717 63.065 188.593 61.846 C 186.497 61.027 184.203 60.455 181.764 60.138 L 181.764 57.978 C 181.764 54.793 178.902 52.201 175.384 52.201 C 171.865 52.201 169.004 54.793 169.004 57.978 L 169.004 60.864 C 160.861 63.093 155.834 68.925 155.834 76.218 C 155.834 85.752 164.288 90.04 172.52 92.963 C 179.499 95.524 180.081 97.563 180.081 99.274 C 180.08 102.531 176.471 103.686 173.378 103.686 Z" style="fill: rgb(255, 255, 255);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 3.4 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 1.8 KiB |
|
@ -118,11 +118,7 @@ function onAdiLoadComplete( adiBuffer, saveAdifFile, adifFileName, newFile)
|
|||
finalCnty = null;
|
||||
else
|
||||
{
|
||||
finalCnty = finalCnty.replace(", ",",");
|
||||
finalCnty = finalCnty.replace("DEKALB","DE KALB");
|
||||
finalCnty = finalCnty.replace("DESOTO","DE SOTO");
|
||||
finalCnty = finalCnty.replace("LAPORTE","LA PORTE");
|
||||
finalCnty = finalCnty.replace("DU PAGE","DUPAGE");
|
||||
finalCnty = finalCnty.replaceAll(" ","");
|
||||
}
|
||||
var finalMode = findAdiField(activeAdifArray[x], "MODE").toUpperCase();
|
||||
var subMode = findAdiField(activeAdifArray[x], "SUBMODE");
|
||||
|
@ -1448,14 +1444,12 @@ function sendTcpMessage( msg, length, port, address)
|
|||
{
|
||||
var net = require('net');
|
||||
var client = new net.Socket();
|
||||
client.setTimeout(30000);
|
||||
client.connect(port, address , function() {
|
||||
|
||||
client.write(msg);
|
||||
client.close();
|
||||
});
|
||||
|
||||
client.on('close', function() {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1599,9 +1593,6 @@ function oldSendToLogger()
|
|||
|
||||
sendToLogger(report);
|
||||
|
||||
|
||||
|
||||
updateCountStats();
|
||||
}
|
||||
|
||||
var g_adifLookupMap =
|
||||
|
@ -1618,10 +1609,10 @@ var g_adifLookupMap =
|
|||
|
||||
function sendToLogger(ADIF)
|
||||
{
|
||||
var report = "";
|
||||
var regex = new RegExp( "<EOH>", 'i');
|
||||
var record = parseADIFRecord( ADIF.split(regex)[1] );
|
||||
var localMode = record["MODE"];
|
||||
|
||||
let regex = new RegExp( "<EOH>", 'i');
|
||||
let record = parseADIFRecord( ADIF.split(regex)[1] );
|
||||
let localMode = record["MODE"];
|
||||
|
||||
if ( localMode == "MFSK" && "SUBMODE" in record )
|
||||
{
|
||||
|
@ -1650,7 +1641,7 @@ function sendToLogger(ADIF)
|
|||
|
||||
if ( !("DXCC" in record) )
|
||||
{
|
||||
var dxcc = callsignToDxcc(record["CALL"]);
|
||||
let dxcc = callsignToDxcc(record["CALL"]);
|
||||
if ( dxcc == -1 )
|
||||
dxcc = 0;
|
||||
record["DXCC"] = String(dxcc);
|
||||
|
@ -1661,93 +1652,179 @@ function sendToLogger(ADIF)
|
|||
record["COUNTRY"] = g_dxccToAltName[Number(record["DXCC"])];
|
||||
}
|
||||
|
||||
if ( g_appSettings.lookupMerge == true && record["CALL"] in g_lookupObjects )
|
||||
{
|
||||
var lookup = g_lookupObjects[record["CALL"]];
|
||||
for ( var key in lookup )
|
||||
if ( g_appSettings.lookupMerge == true )
|
||||
{
|
||||
let request = g_Idb.transaction(["lookups"], "readwrite")
|
||||
.objectStore("lookups")
|
||||
.get(record["CALL"]);
|
||||
|
||||
request.onsuccess = function(event)
|
||||
{
|
||||
if ( key in g_adifLookupMap )
|
||||
if ( request.result )
|
||||
{
|
||||
record[g_adifLookupMap[key]] = lookup[key];
|
||||
let lookup = request.result;
|
||||
for ( let key in lookup )
|
||||
{
|
||||
if ( key in g_adifLookupMap )
|
||||
{
|
||||
record[g_adifLookupMap[key]] = lookup[key];
|
||||
}
|
||||
}
|
||||
if ( "GRIDSQUARE" in record && "grid" in lookup )
|
||||
{
|
||||
if ( record["GRIDSQUARE"].substr(0, 4) == lookup["grid"].substr(0, 4) )
|
||||
{
|
||||
record["GRIDSQUARE"] = lookup["grid"];
|
||||
}
|
||||
}
|
||||
if ( g_appSettings.lookupMissingGrid && "grid" in lookup && ( !("GRIDSQUARE" in record) || record["GRIDSQUARE"].length == 0 ))
|
||||
{
|
||||
record["GRIDSQUARE"] = lookup["grid"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( "GRIDSQUARE" in record && "grid" in lookup )
|
||||
finishSendingReport(record, localMode);
|
||||
};
|
||||
|
||||
request.onerror = function(event)
|
||||
{
|
||||
if ( record["GRIDSQUARE"].substr(0, 4) == lookup["grid"].substr(0, 4) )
|
||||
{
|
||||
record["GRIDSQUARE"] = lookup["grid"];
|
||||
}
|
||||
}
|
||||
if ( g_appSettings.lookupMissingGrid && "grid" in lookup && ( !("GRIDSQUARE" in record) || record["GRIDSQUARE"].length == 0 ))
|
||||
{
|
||||
record["GRIDSQUARE"] = lookup["grid"];
|
||||
finishSendingReport(record, localMode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
finishSendingReport(record, localMode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function finishSendingReport(record, localMode)
|
||||
{
|
||||
let report = "";
|
||||
|
||||
for (var key in record )
|
||||
let reportHash = record["CALL"] + record["MODE"] + localMode;
|
||||
|
||||
for (let key in record )
|
||||
{
|
||||
report += "<" +key+ ":" +record[key].length+ ">"+record[key]+" ";
|
||||
}
|
||||
report += "<EOR>";
|
||||
|
||||
|
||||
if ( g_N1MMSettings.enable == true && g_N1MMSettings.port > 1024 && g_N1MMSettings.ip.length > 4 )
|
||||
{
|
||||
sendUdpMessage( report, report.length, parseInt(g_N1MMSettings.port), g_N1MMSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to N1MM</font>");
|
||||
}
|
||||
|
||||
|
||||
if ( g_log4OMSettings.enable == true && g_log4OMSettings.port > 1024 && g_log4OMSettings.ip.length > 4 )
|
||||
{
|
||||
sendUdpMessage( "ADD " + report, report.length+4, parseInt(g_log4OMSettings.port), g_log4OMSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to Log4OM</font>");
|
||||
}
|
||||
|
||||
|
||||
var reportHash = unique(report);
|
||||
|
||||
if ( reportHash != lastReportHash )
|
||||
{
|
||||
onAdiLoadComplete( "GT<EOH>" + report);
|
||||
lastReportHash = reportHash;
|
||||
|
||||
// Log worthy
|
||||
if ( logGTqsoCheckBox.checked == true )
|
||||
if ( g_N1MMSettings.enable == true && g_N1MMSettings.port > 1024 && g_N1MMSettings.ip.length > 4 )
|
||||
{
|
||||
var fs = require('fs');
|
||||
fs.appendFileSync( g_qsoLogFile , report + "\r\n");
|
||||
addLastTraffic("<font style='color:white'>Logged to GridTracker backup</font>");
|
||||
sendUdpMessage( report, report.length, parseInt(g_N1MMSettings.port), g_N1MMSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to N1MM</font>");
|
||||
}
|
||||
|
||||
|
||||
if ( g_log4OMSettings.enable == true && g_log4OMSettings.port > 1024 && g_log4OMSettings.ip.length > 4 )
|
||||
{
|
||||
sendUdpMessage( "ADD " + report, report.length+4, parseInt(g_log4OMSettings.port), g_log4OMSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to Log4OM</font>");
|
||||
}
|
||||
|
||||
try {
|
||||
onAdiLoadComplete( "GT<EOH>" + report);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception Internal Log</font>");
|
||||
}
|
||||
try {
|
||||
// Log worthy
|
||||
if ( logGTqsoCheckBox.checked == true )
|
||||
{
|
||||
var fs = require('fs');
|
||||
fs.appendFileSync( g_qsoLogFile , report + "\r\n");
|
||||
addLastTraffic("<font style='color:white'>Logged to GridTracker backup</font>");
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception GridTracker backup</font>");
|
||||
}
|
||||
|
||||
sendQrzLogEntry(report);
|
||||
try {
|
||||
sendQrzLogEntry(report);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception QRZ Log</font>");
|
||||
}
|
||||
|
||||
sendClubLogEntry(report);
|
||||
try {
|
||||
sendClubLogEntry(report);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception ClubLog Log</font>");
|
||||
}
|
||||
|
||||
sendHrdLogEntry(report);
|
||||
try {
|
||||
sendHrdLogEntry(report);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception HrdLog.net Log</font>");
|
||||
}
|
||||
|
||||
sendCloudlogEntry(report);
|
||||
try {
|
||||
sendCloudlogEntry(report);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception Cloudlog Log</font>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( g_acLogSettings.enable == true && g_acLogSettings.port > 0 && g_acLogSettings.ip.length > 4 )
|
||||
{
|
||||
sendACLogMessage(record,g_acLogSettings.port,g_acLogSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to N3FJP</font>");
|
||||
try {
|
||||
sendACLogMessage(record,g_acLogSettings.port,g_acLogSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to N3FJP</font>");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception N3FJP Log</font>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( g_dxkLogSettings.enable == true && g_dxkLogSettings.port > 0 && g_dxkLogSettings.ip.length > 4 )
|
||||
{
|
||||
sendDXKeeperLogMessage(report, g_dxkLogSettings.port , g_dxkLogSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to DXKeeper</font>");
|
||||
try {
|
||||
sendDXKeeperLogMessage(report, g_dxkLogSettings.port , g_dxkLogSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to DXKeeper</font>");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception DXKeeper Log</font>");
|
||||
}
|
||||
}
|
||||
|
||||
if ( g_HRDLogbookLogSettings.enable == true && g_HRDLogbookLogSettings.port > 0 && g_HRDLogbookLogSettings.ip.length > 4 )
|
||||
{
|
||||
sendHRDLogbookEntry(record, g_HRDLogbookLogSettings.port , g_HRDLogbookLogSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to HRD Logbook</font>");
|
||||
try {
|
||||
sendHRDLogbookEntry(record, g_HRDLogbookLogSettings.port , g_HRDLogbookLogSettings.ip);
|
||||
addLastTraffic("<font style='color:white'>Logged to HRD Logbook</font>");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception HRD Log</font>");
|
||||
}
|
||||
}
|
||||
|
||||
sendLotwLogEntry(report);
|
||||
try {
|
||||
sendLotwLogEntry(report);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception LoTW Log</font>");
|
||||
}
|
||||
|
||||
if ( logeQSLQSOCheckBox.checked == true && nicknameeQSLCheckBox.checked == true && eQSLNickname.value.trim().length > 0 )
|
||||
{
|
||||
|
@ -1760,16 +1837,36 @@ function sendToLogger(ADIF)
|
|||
report += "<EOR>";
|
||||
}
|
||||
|
||||
sendeQSLEntry(report);
|
||||
|
||||
try {
|
||||
sendeQSLEntry(report);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception LoTW Log</font>");
|
||||
}
|
||||
|
||||
alertLogMessage();
|
||||
try {
|
||||
alertLogMessage();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception Alert Log</font>");
|
||||
}
|
||||
|
||||
|
||||
if ( lookupCloseLog.checked == true )
|
||||
{
|
||||
openLookupWindow(false);
|
||||
try {
|
||||
openLookupWindow(false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
addLastTraffic("<font style='color:red'>Exception Hide Lookup</font>");
|
||||
}
|
||||
}
|
||||
}
|
||||
lastReportHash = reportHash;
|
||||
|
||||
return report;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,16 +31,34 @@ function dumpFile(file)
|
|||
}
|
||||
}
|
||||
|
||||
function dumpDir(dir)
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( fs.existsSync(dir) )
|
||||
fs.rmdirSync(dir);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
function callsignServicesInit()
|
||||
{
|
||||
// Dump old data files we no longer reference
|
||||
dumpFile(g_jsonDir + "uls-callsigns.json");
|
||||
dumpFile(g_jsonDir + "us-callsigns.json");
|
||||
dumpFile(g_jsonDir + "lotw-callsigns.json");
|
||||
dumpFile(g_jsonDir + "lotw-ts-callsigns.json");
|
||||
dumpFile(g_jsonDir + "eqsl-callsigns.json");
|
||||
dumpFile(g_jsonDir + "cloqrs-callsigns.json");
|
||||
dumpFile(g_jsonDir + "internal_qso.json");
|
||||
dumpFile(g_jsonDir + "spots.json");
|
||||
dumpDir(g_jsonDir);
|
||||
|
||||
g_lotwFile = g_jsonDir + "lotw-ts-callsigns.json";
|
||||
g_eqslFile = g_jsonDir + "eqsl-callsigns.json";
|
||||
g_oqrsFile = g_jsonDir + "cloqrs-callsigns.json";
|
||||
g_lotwFile = g_NWappData + "lotw-ts-callsigns.json";
|
||||
g_eqslFile = g_NWappData + "eqsl-callsigns.json";
|
||||
g_oqrsFile = g_NWappData + "cloqrs-callsigns.json";
|
||||
|
||||
if ( g_callsignLookups.lotwUseEnable )
|
||||
{
|
||||
|
@ -435,7 +453,7 @@ function updateQSO()
|
|||
{
|
||||
if (details.cnty.indexOf(",") == -1)
|
||||
{
|
||||
if (!(details.state + "," + details.cnty in g_cntyToCounty))
|
||||
if (!(details.state + "," + details.cnty in g_cntyToCounty[details.cnty]))
|
||||
lookupCall = true;
|
||||
}
|
||||
else
|
||||
|
@ -447,7 +465,7 @@ function updateQSO()
|
|||
{
|
||||
if (g_callsignLookups.ulsUseEnable)
|
||||
{
|
||||
lookupUsCallsign(details);
|
||||
lookupUsCallsign(details,true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -577,10 +595,11 @@ function getChunkedBuffer(file_url, callback, flag, mode, port, cookie, errorHan
|
|||
}
|
||||
|
||||
|
||||
var g_ulsDatabase = openDatabase('ulsDB', '1.0', 'US Callsigns', 40 * 1024 * 1024);
|
||||
var g_ulsDatabase = openDatabase('ulsDB', '1.0', 'US Callsigns', 50 * 1024 * 1024);
|
||||
|
||||
|
||||
g_ulsDatabase.transaction(function (tx) {
|
||||
tx.executeSql('CREATE TABLE IF NOT EXISTS calls (callsign TEXT PRIMARY KEY, zip, state)');
|
||||
tx.executeSql('CREATE TABLE IF NOT EXISTS calls ( callsign TEXT PRIMARY KEY, zip, state)');
|
||||
});
|
||||
|
||||
|
||||
|
@ -588,6 +607,7 @@ function resetULSDatabase()
|
|||
{
|
||||
g_callsignLookups.ulsLastUpdate = 0;
|
||||
g_ulsCallsignsCount = 0;
|
||||
|
||||
}
|
||||
|
||||
function processulsCallsigns(data, flag, cookies, starting, finished)
|
||||
|
@ -616,21 +636,32 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
|||
g_ulsDatabase.transaction(function (tx) {
|
||||
if ( starting == true )
|
||||
{
|
||||
if ( g_ulsLoadTimer != null )
|
||||
clearTimeout(g_ulsLoadTimer);
|
||||
g_ulsLoadTimer = null;
|
||||
g_ulsWhenDate = 0;
|
||||
g_ulsCallsignsCount = 0;
|
||||
g_callsignLookups.ulsLastUpdate = 0;
|
||||
saveCallsignSettings();
|
||||
ulsUpdatedTd.innerHTML = "<b><i>Processing...</i></b>";
|
||||
tx.executeSql('DROP TABLE calls');
|
||||
tx.executeSql('CREATE TABLE IF NOT EXISTS calls (callsign TEXT PRIMARY KEY, zip, state)');
|
||||
tx.executeSql('CREATE TABLE IF NOT EXISTS calls ( callsign TEXT PRIMARY KEY, zip, state)');
|
||||
|
||||
}
|
||||
for (var x in lines )
|
||||
{
|
||||
if ( lines[x].length )
|
||||
{
|
||||
tx.executeSql( 'INSERT INTO calls (callsign, zip, state) VALUES ("'+lines[x].substr(7)+'","'+lines[x].substr(0,5)+'","'+lines[x].substr(5,2)+'")');
|
||||
++g_ulsCallsignsCount;
|
||||
if ( g_ulsCallsignsCount % 7969 == 0 )
|
||||
ulsCountTd.innerHTML = g_ulsCallsignsCount;
|
||||
tx.executeSql( 'INSERT INTO calls (rowid, callsign, zip, state) VALUES ('+g_ulsCallsignsCount+',"'+lines[x].substr(7)+'","'+lines[x].substr(0,5)+'","'+lines[x].substr(5,2)+'")');
|
||||
if ( g_ulsCallsignsCount % 10000 == 0 )
|
||||
{
|
||||
tx.executeSql('SELECT count(*) as cnt FROM calls', [], function (rx, results)
|
||||
{
|
||||
var len = results.rows.length, i;
|
||||
if ( len == 1 )
|
||||
{
|
||||
ulsCountTd.innerHTML = results.rows[0]["cnt"];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
delete lines;
|
||||
|
@ -692,29 +723,53 @@ function lookupUsCallsign( object , writeState = false)
|
|||
{
|
||||
object.state = "US-"+results.rows[0]["state"];
|
||||
}
|
||||
if ( writeState )
|
||||
setState(object)
|
||||
}
|
||||
object.zipcode = results.rows[0]["zip"];
|
||||
object.zipcode = String(results.rows[0]["zip"]);
|
||||
if ( object.cnty == null )
|
||||
{
|
||||
if ( object.zipcode in g_zipToCounty )
|
||||
let request = g_Idb.transaction(["lookups"], "readwrite")
|
||||
.objectStore("lookups")
|
||||
.get(object.DEcall);
|
||||
|
||||
request.onsuccess = function(event)
|
||||
{
|
||||
var counties = g_zipToCounty[object.zipcode];
|
||||
var cntyString = g_countyData[counties[0]].geo["properties"]["st"]+","+ g_countyData[counties[0]].geo["properties"]["n"].toUpperCase();
|
||||
for ( var county in counties )
|
||||
if ( request.result )
|
||||
{
|
||||
cntyString = g_countyData[counties[county]].geo["properties"]["st"]+","+ g_countyData[counties[county]].geo["properties"]["n"].toUpperCase();
|
||||
if ( !(cntyString in g_tracker.worked.cnty) )
|
||||
break;
|
||||
if ( !(cntyString in g_tracker.confirmed.cnty) )
|
||||
break;
|
||||
object.cnty = request.result.cnty;
|
||||
object.qual = true;
|
||||
}
|
||||
object.cnty = cntyString;
|
||||
|
||||
if ( object.cnty == null && object.zipcode in g_zipToCounty )
|
||||
{
|
||||
var counties = g_zipToCounty[object.zipcode];
|
||||
if ( counties.length > 1 )
|
||||
object.qual = false;
|
||||
else
|
||||
object.qual = true;
|
||||
object.cnty = counties[0];
|
||||
}
|
||||
else
|
||||
object.qual = false;
|
||||
if ( writeState )
|
||||
setState(object);
|
||||
};
|
||||
|
||||
request.onerror = function(event)
|
||||
{
|
||||
object.qual = false;
|
||||
if ( writeState )
|
||||
setState(object);
|
||||
}
|
||||
|
||||
}
|
||||
if ( writeState )
|
||||
setState(object);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, null);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,12 +27,12 @@ var validSettings =
|
|||
"speechSettings",
|
||||
"startupLogs",
|
||||
"trustedQslSettings",
|
||||
"screenSettings"
|
||||
];
|
||||
|
||||
var def_appSettings =
|
||||
{
|
||||
"alertMute" : 0,
|
||||
"callRosterOpen" : false,
|
||||
"rosterAlwaysOnTop": false,
|
||||
"centerGridsquare" : "",
|
||||
"chatUUID" : "",
|
||||
|
@ -126,7 +126,8 @@ var def_mapSettings =
|
|||
"strikesNotify" : false,
|
||||
"trafficDecode" : true,
|
||||
"usNexrad" : false,
|
||||
"zoom" : 4
|
||||
"zoom" : 4,
|
||||
"mapTrans" : 0.5
|
||||
};
|
||||
|
||||
var def_adifLogSettings =
|
||||
|
|
|
@ -125,3 +125,7 @@ Number.prototype.pad = function(size) {
|
|||
return s;
|
||||
}
|
||||
|
||||
String.prototype.replaceAll = function(str1, str2)
|
||||
{
|
||||
return this.split(str1).join(str2);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
// GridTracker ©2020 N0TTL
|
||||
|
||||
var fs = require('fs');
|
||||
var g_isShowing = false;
|
||||
|
||||
var callRoster = {};
|
||||
var g_blockedCalls = {};
|
||||
var g_blockedCQ = {};
|
||||
|
@ -17,7 +17,6 @@ var r_currentDXCCs = -1;
|
|||
var r_callsignManifest = null;
|
||||
var g_rosterSettings = {};
|
||||
var g_day = 0;
|
||||
var r_jsonDir = "";
|
||||
var g_menu = null;
|
||||
var g_callMenu = null;
|
||||
var g_ageMenu = null;
|
||||
|
@ -127,8 +126,6 @@ var g_defaultSettings =
|
|||
"reference":0,
|
||||
"controls":true,
|
||||
"compact": false,
|
||||
"screenScale":12,
|
||||
"screenScale":0.0,
|
||||
"settingProfiles":false,
|
||||
"lastSortIndex":6,
|
||||
"lastSortReverse":1
|
||||
|
@ -1106,21 +1103,50 @@ function viewRoster()
|
|||
var finalDxcc = callRoster[callHash].callObj.dxcc;
|
||||
if ( callRoster[callHash].callObj.cnty && ( finalDxcc == 291 || finalDxcc == 110 || finalDxcc == 6 || finalDxcc == 202) && callRoster[callHash].callObj.cnty.length > 0 )
|
||||
{
|
||||
|
||||
var hash = callRoster[callHash].callObj.cnty + workHash;
|
||||
if ( (g_rosterSettings.huntNeed == "worked" && !(hash in g_worked.cnty)) || ( g_rosterSettings.huntNeed == "confirmed" && !(hash in g_confirmed.cnty)))
|
||||
|
||||
if ( (g_rosterSettings.huntNeed == "worked" && !(hash in g_worked.cnty)) || ( g_rosterSettings.huntNeed == "confirmed" && !(hash in g_confirmed.cnty)) || callRoster[callHash].callObj.qual == false)
|
||||
{
|
||||
shouldAlert = true;
|
||||
callRoster[callHash].callObj.reason.push("uscnty");
|
||||
|
||||
if ( g_rosterSettings.huntNeed == "confirmed" && (hash in g_worked.cnty) )
|
||||
if ( callRoster[callHash].callObj.qual == false )
|
||||
{
|
||||
cntyConf = unconf + cnty + inversionAlpha + ";";
|
||||
let counties = window.opener.g_zipToCounty[callRoster[callHash].callObj.zipcode];
|
||||
var foundHit = false;
|
||||
for ( let cnt in counties )
|
||||
{
|
||||
let hh = counties[cnt] + workHash;
|
||||
callRoster[callHash].callObj.cnty = counties[cnt];
|
||||
if ( g_rosterSettings.huntNeed == "worked" && !(hh in g_worked.cnty) )
|
||||
{
|
||||
foundHit = true;
|
||||
break;
|
||||
}
|
||||
if ( g_rosterSettings.huntNeed == "confirmed" && !(hh in g_confirmed.cnty))
|
||||
{
|
||||
foundHit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( foundHit )
|
||||
shouldAlert = true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
cntyBg = cnty + inversionAlpha ;
|
||||
cnty = bold;
|
||||
shouldAlert = true;
|
||||
}
|
||||
|
||||
if ( shouldAlert )
|
||||
{
|
||||
callRoster[callHash].callObj.reason.push("uscnty");
|
||||
|
||||
if ( g_rosterSettings.huntNeed == "confirmed" && (hash in g_worked.cnty) )
|
||||
{
|
||||
cntyConf = unconf + cnty + inversionAlpha + ";";
|
||||
}
|
||||
else
|
||||
{
|
||||
cntyBg = cnty + inversionAlpha ;
|
||||
cnty = bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1404,9 +1430,9 @@ function viewRoster()
|
|||
{
|
||||
|
||||
|
||||
|
||||
var thisHash = thisCall + newCallList[x].band+newCallList[x].mode;
|
||||
|
||||
worker += "<tbody><tr id='" + thisCall + newCallList[x].band+newCallList[x].mode + "'>";
|
||||
worker += "<tbody><tr id='" + thisHash + "'>";
|
||||
worker += "<td title='"+ newCallList[x].awardReason +"' name='Callsign' align=left " +newCallList[x].style.callsign + " onClick='initiateQso(\"" +
|
||||
thisCall + newCallList[x].band+newCallList[x].mode + "\")'>" + thisCall.formatCallsign() + "</td>";
|
||||
|
||||
|
@ -1439,7 +1465,7 @@ function viewRoster()
|
|||
if ( g_rosterSettings.columns.State )
|
||||
worker += "<td align='center' "+newCallList[x].style.state+" >"+ (newCallList[x].state ? newCallList[x].state.substr(3) : "")+"</td>";
|
||||
if ( g_rosterSettings.columns.County )
|
||||
worker += "<td align='center' "+newCallList[x].style.cnty+" >"+ (newCallList[x].cnty ? toTitleCase(newCallList[x].cnty.substr(3)) : "")+"</td>";
|
||||
worker += "<td align='center' "+newCallList[x].style.cnty+" "+ (newCallList[x].cnty ? (newCallList[x].qual?"": "onClick='window.opener.lookupCallsign(\""+thisCall + "\",\""+ grid+"\")'") :"" )+">"+ (newCallList[x].cnty ? (newCallList[x].qual?"":"~ ") + window.opener.g_cntyToCounty[newCallList[x].cnty] + (newCallList[x].qual?"":" ~") : "")+"</td>";
|
||||
if ( g_rosterSettings.columns.Cont )
|
||||
worker += "<td align='center' "+newCallList[x].style.cont+" >"+ (newCallList[x].cont ? newCallList[x].cont:"")+"</td>";
|
||||
|
||||
|
@ -1712,7 +1738,7 @@ function getSpotString(callObj)
|
|||
|
||||
function openChatToCid(cid)
|
||||
{
|
||||
window.opener.showMessaging(cid);
|
||||
window.opener.showMessaging(true, cid);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1723,8 +1749,7 @@ function initiateQso(thisHash)
|
|||
|
||||
function callLookup(thisHash, grid)
|
||||
{
|
||||
var thisCall = callRoster[thisHash].DEcall;
|
||||
window.opener.startLookup(thisCall,grid);
|
||||
window.opener.startLookup(callRoster[thisHash].DEcall, callRoster[thisHash].grid);
|
||||
}
|
||||
|
||||
function callingLookup(thisHash, grid)
|
||||
|
@ -2679,7 +2704,6 @@ function init()
|
|||
|
||||
lockNewWindows();
|
||||
|
||||
r_jsonDir = window.opener.g_jsonDir;
|
||||
|
||||
if ( window.opener.g_mapSettings.offlineMode == false )
|
||||
getBuffer("https://tagloomis.com/gt/callsigns/manifest.json", manifestResult, null, "https", 443);
|
||||
|
@ -2780,7 +2804,7 @@ function init()
|
|||
callLookup(g_targetHash,"");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
g_callMenu.append(item);
|
||||
|
||||
item = new nw.MenuItem({
|
||||
|
@ -4290,8 +4314,4 @@ function doubleCompile(award, firstLevel)
|
|||
return singleCompile(award,firstLevel);
|
||||
}
|
||||
|
||||
var g_process = require('process');
|
||||
|
||||
g_process.on('uncaughtException', function (e) {
|
||||
console.error(e.stack);
|
||||
});
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
var s_title = null;
|
||||
var s_screenSettings = {};
|
||||
var s_zoomLevel = 0;
|
||||
|
||||
|
||||
nw.Screen.Init();
|
||||
|
||||
|
@ -60,15 +64,55 @@ var screenCB = {
|
|||
}
|
||||
};
|
||||
|
||||
function saveScreenSettings()
|
||||
{
|
||||
var setting = { "showing" : g_isShowing , "zoomLevel" : s_zoomLevel };
|
||||
|
||||
s_screenSettings = JSON.parse(localStorage.screenSettings);
|
||||
|
||||
s_screenSettings[s_title] = setting;
|
||||
|
||||
localStorage.screenSettings = JSON.stringify(s_screenSettings);
|
||||
}
|
||||
// listen to screen events
|
||||
nw.Screen.on('displayAdded', screenCB.onDisplayAdded);
|
||||
nw.Screen.on('displayRemoved', screenCB.onDisplayRemoved);
|
||||
|
||||
var g_isShowing = false;
|
||||
|
||||
nw.Window.get().on('loaded', function () {
|
||||
s_title = document.title.substr(0,16).trim();
|
||||
g_isShowing = false;
|
||||
if ( typeof localStorage.screenSettings == "undefined" )
|
||||
{
|
||||
localStorage.screenSettings = "{}";
|
||||
|
||||
}
|
||||
s_screenSettings = JSON.parse(localStorage.screenSettings);
|
||||
|
||||
if ( !(s_title in s_screenSettings) )
|
||||
{
|
||||
saveScreenSettings();
|
||||
}
|
||||
if ( !("zoomLevel" in s_screenSettings[s_title]) )
|
||||
{
|
||||
saveScreenSettings();
|
||||
}
|
||||
g_isShowing = s_screenSettings[s_title].showing;
|
||||
nw.Window.get().zoomLevel = s_zoomLevel = s_screenSettings[s_title].zoomLevel;
|
||||
|
||||
if ( g_isShowing || s_title == "GridTracker ©202" )
|
||||
this.show();
|
||||
else
|
||||
this.hide();
|
||||
|
||||
g_initialScreenCount = nw.Screen.screens.length;
|
||||
setWindowInfo();
|
||||
|
||||
document.addEventListener('keydown', onZoomControlDown, true);
|
||||
});
|
||||
|
||||
|
||||
var g_windowMoveTimer = null;
|
||||
nw.Window.get().on('move', function (x,y) {
|
||||
if ( g_windowMoveTimer != null )
|
||||
|
@ -86,4 +130,47 @@ nw.Window.get().on('resize', function (w,h) {
|
|||
}
|
||||
g_windowResizeTimer = setTimeout(setWindowInfo,1000);
|
||||
});
|
||||
|
||||
|
||||
|
||||
var g_zoomKeys = { "NumpadSubtract":reduceZoom , "Minus":reduceZoom , "NumpadAdd":increaseZoom, "Equal":increaseZoom, "Numpad0":resetZoom , "Digit0":resetZoom };
|
||||
|
||||
function onZoomControlDown(event)
|
||||
{
|
||||
if ( event.ctrlKey )
|
||||
{
|
||||
if ( event.code in g_zoomKeys )
|
||||
{
|
||||
g_zoomKeys[event.code]();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reduceZoom()
|
||||
{
|
||||
s_zoomLevel -= 0.20;
|
||||
nw.Window.get().zoomLevel = s_zoomLevel;
|
||||
saveScreenSettings();
|
||||
}
|
||||
|
||||
function increaseZoom()
|
||||
{
|
||||
s_zoomLevel += 0.20;
|
||||
nw.Window.get().zoomLevel = s_zoomLevel;
|
||||
|
||||
saveScreenSettings();
|
||||
}
|
||||
|
||||
function resetZoom()
|
||||
{
|
||||
s_zoomLevel = 0;
|
||||
nw.Window.get().zoomLevel = s_zoomLevel;
|
||||
saveScreenSettings();
|
||||
}
|
||||
|
||||
var g_process = require('process');
|
||||
|
||||
g_process.on('uncaughtException', function (e) {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// GridTracker ©2020 N0TTL
|
||||
|
||||
var g_isShowing = true;
|
||||
|
||||
|
||||
document.oncontextmenu = function() {
|
||||
return false;
|
||||
|
|
|
@ -269,12 +269,18 @@
|
|||
.inputTextValue
|
||||
{
|
||||
-webkit-border-radius:6px;
|
||||
border:1px solid #999;
|
||||
outline:none;
|
||||
margin:4px;
|
||||
margin:1px;
|
||||
padding:2px;
|
||||
padding-left:3px;
|
||||
padding-right:2px;
|
||||
padding-bottom:1px;
|
||||
|
||||
border-style:inset;
|
||||
}
|
||||
.inputTextValue:hover {
|
||||
border-color:#FFF;
|
||||
border-style:outset;
|
||||
}
|
||||
.roundBorderValue
|
||||
{
|
||||
border:1px solid white;
|
||||
|
@ -328,7 +334,7 @@
|
|||
.button
|
||||
{
|
||||
|
||||
-webkit-border-radius:4px;
|
||||
border-radius:4px;
|
||||
cursor:pointer;
|
||||
margin:0px;
|
||||
|
||||
|
@ -341,7 +347,7 @@
|
|||
display:inline-block;
|
||||
color:#EEE;
|
||||
|
||||
-webkit-transition: border-style;
|
||||
transition: border-style;
|
||||
}
|
||||
|
||||
.button:active
|
||||
|
@ -432,8 +438,8 @@
|
|||
{
|
||||
margin:2px;
|
||||
padding:0px;
|
||||
min-height:60px;
|
||||
min-width:170px;
|
||||
min-height:40px;
|
||||
min-width:150px;
|
||||
border-width:1px;
|
||||
border-color:#AAA;
|
||||
border-style:inset;
|
||||
|
@ -443,6 +449,11 @@
|
|||
-webkit-transition:border-color;
|
||||
}
|
||||
|
||||
.mapItem table
|
||||
{
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.mapItemNoSize
|
||||
{
|
||||
margin:2px;
|
||||
|
@ -942,3 +953,35 @@ table.subtable tr:hover td { box-shadow: none; }
|
|||
|
||||
}
|
||||
|
||||
table.bioTable {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #888;
|
||||
background-color: black;
|
||||
text-align: center;
|
||||
table-layout: fixed;
|
||||
width: 300px;
|
||||
}
|
||||
table.bioTable td, table.bioTable th {
|
||||
border: 1px solid #888;
|
||||
padding:2px 4px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
table.bioTable thead {
|
||||
border-bottom: 2px solid #888;
|
||||
|
||||
}
|
||||
table.bioTable thead th {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border-left: 2px solid #888;
|
||||
}
|
||||
table.bioTable thead th:first-child {
|
||||
border-left: none;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.bioTable tr:hover td{ box-shadow: inset 0px 11px 6px -8px #888, inset 0px -11px 6px -8px #888; }
|
|
@ -1,168 +0,0 @@
|
|||
/*
|
||||
* L.TileLayer.Grayscale is a regular tilelayer with grayscale makeover.
|
||||
* Actually, it's an invert and brightness method you're welcome ( N0TTL )
|
||||
*/
|
||||
|
||||
|
||||
var g_kernels = {
|
||||
none: [
|
||||
0, 0, 0,
|
||||
0, 1, 0,
|
||||
0, 0, 0
|
||||
],
|
||||
sharpen: [
|
||||
0, -1, 0,
|
||||
-1, 5, -1,
|
||||
0, -1, 0
|
||||
],
|
||||
sharpenLess: [
|
||||
0, -1, 0,
|
||||
-1, 10, -1,
|
||||
0, -1, 0
|
||||
],
|
||||
blur: [
|
||||
1, 1, 1,
|
||||
1, 1, 1,
|
||||
1, 1, 1
|
||||
],
|
||||
shadow: [
|
||||
1, 2, 1,
|
||||
0, 1, 0,
|
||||
-1, -2, -1
|
||||
],
|
||||
emboss: [
|
||||
-2, 1, 0,
|
||||
-1, 1, 1,
|
||||
0, 1, 2
|
||||
],
|
||||
edge: [
|
||||
0, 1, 0,
|
||||
1, -4, 1,
|
||||
0, 1, 0
|
||||
]
|
||||
};
|
||||
|
||||
function normalize(kernel) {
|
||||
var len = kernel.length;
|
||||
var normal = new Array(len);
|
||||
var i, sum = 0;
|
||||
for (i = 0; i < len; ++i) {
|
||||
sum += kernel[i];
|
||||
}
|
||||
if (sum <= 0) {
|
||||
normal.normalized = false;
|
||||
sum = 1;
|
||||
} else {
|
||||
normal.normalized = true;
|
||||
}
|
||||
for (i = 0; i < len; ++i) {
|
||||
normal[i] = kernel[i] / sum;
|
||||
}
|
||||
return normal;
|
||||
}
|
||||
|
||||
function convolve(context, kernel) {
|
||||
var canvas = context.canvas;
|
||||
var width = canvas.width;
|
||||
var height = canvas.height;
|
||||
|
||||
var size = Math.sqrt(kernel.length);
|
||||
var half = Math.floor(size / 2);
|
||||
|
||||
var inputData = context.getImageData(0, 0, width, height).data;
|
||||
|
||||
var output = context.createImageData(width, height);
|
||||
var outputData = output.data;
|
||||
|
||||
for (var pixelY = 0; pixelY < height; ++pixelY) {
|
||||
var pixelsAbove = pixelY * width;
|
||||
for (var pixelX = 0; pixelX < width; ++pixelX) {
|
||||
var r = 0, g = 0, b = 0, a = 0;
|
||||
for (var kernelY = 0; kernelY < size; ++kernelY) {
|
||||
for (var kernelX = 0; kernelX < size; ++kernelX) {
|
||||
var weight = kernel[kernelY * size + kernelX];
|
||||
var neighborY = Math.min(
|
||||
height - 1, Math.max(0, pixelY + kernelY - half));
|
||||
var neighborX = Math.min(
|
||||
width - 1, Math.max(0, pixelX + kernelX - half));
|
||||
var inputIndex = (neighborY * width + neighborX) * 4;
|
||||
r += inputData[inputIndex] * weight;
|
||||
g += inputData[inputIndex + 1] * weight;
|
||||
b += inputData[inputIndex + 2] * weight;
|
||||
a += inputData[inputIndex + 3] * weight;
|
||||
}
|
||||
}
|
||||
var outputIndex = (pixelsAbove + pixelX) * 4;
|
||||
outputData[outputIndex] = r;
|
||||
outputData[outputIndex + 1] = g;
|
||||
outputData[outputIndex + 2] = b;
|
||||
outputData[outputIndex + 3] = kernel.normalized ? a : 255;
|
||||
}
|
||||
}
|
||||
context.putImageData(output, 0, 0);
|
||||
}
|
||||
|
||||
function gray_hexToRgb(color) {
|
||||
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
||||
color = color.replace(shorthandRegex, function(m, r, g, b) {
|
||||
return r + r + g + g + b + b;
|
||||
});
|
||||
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
|
||||
return result ? {
|
||||
r: parseInt(result[1], 16)/255,
|
||||
g: parseInt(result[2], 16)/255,
|
||||
b: parseInt(result[3], 16)/255
|
||||
} : {
|
||||
r: 0,
|
||||
g: 0,
|
||||
b: 0
|
||||
};
|
||||
}
|
||||
// function applies greyscale to every pixel in canvas
|
||||
function greyscale(context, options) {
|
||||
var canvas = context.canvas;
|
||||
var imgd = context.getImageData(0, 0, canvas.width, canvas.height);
|
||||
|
||||
console.log(imgd);
|
||||
imgd.lastState = "1";
|
||||
var data = imgd.data;
|
||||
|
||||
|
||||
if ( g_mapSettings.invert == 1 )
|
||||
{
|
||||
for (var i = 0; i < data.length; i += 4) {
|
||||
data[i] = (255 - data[i]) ; // red
|
||||
data[i + 1] = (255 - data[i + 1]); // green
|
||||
data[i + 2] = (255 - data[i + 2]); // blue
|
||||
}
|
||||
}
|
||||
if ( g_mapSettings.grayscale == 1 && g_mapHue == 0 )
|
||||
{
|
||||
for (var i = 0; i < data.length; i += 4) {
|
||||
var avg = ((data[i] + data[i + 1] + data[i + 2]) / 3) ;
|
||||
data[i] = avg; // red
|
||||
data[i + 1] = avg; // green
|
||||
data[i + 2] = avg; // blue
|
||||
}
|
||||
}
|
||||
if ( g_mapHue != 0 )
|
||||
{
|
||||
var rgbColor = gray_hexToRgb(g_mapHue);
|
||||
|
||||
for (var i = 0; i < data.length; i += 4) {
|
||||
var avg = ((data[i] + data[i + 1] + data[i + 2]) / 3);
|
||||
data[i] = avg * rgbColor.r; // red
|
||||
data[i + 1] = avg * rgbColor.g; // green
|
||||
data[i + 2] = avg * rgbColor.b; // blue
|
||||
}
|
||||
}
|
||||
|
||||
context.putImageData(imgd, 0, 0);
|
||||
|
||||
if ( g_mapSettings.convolve != "none" )
|
||||
{
|
||||
var selectedKernel = normalize(g_kernels[g_mapSettings.convolve]);
|
||||
convolve(context,selectedKernel);
|
||||
}
|
||||
}
|
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.1 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 11 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 11 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.3 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.6 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 12 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 5.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 10 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 17 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 6.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.6 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 9.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 13 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 8.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 5.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.0 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 9.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.3 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.1 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.4 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.6 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 20 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 17 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 8.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.4 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 5.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 12 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 16 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 8.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 11 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.1 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 6.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 9.2 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 8.0 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.4 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.0 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.2 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 11 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 16 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 10 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.6 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 909 B |
Po Szerokość: | Wysokość: | Rozmiar: 5.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 15 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.4 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.2 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 909 B |
Po Szerokość: | Wysokość: | Rozmiar: 3.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 15 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 13 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 14 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 9.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.6 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 909 B |