diff --git a/README.md b/README.md index ca493df..cf7849b 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,11 @@ And now you can run GridTracker from your local repository with a command like To access the Developer Tools, right-click on an unused area of a window, or press F12. +In the map window, most of the right column background areas will respond with the developer context menu. + +In the roster window, only the "Transmit/Receive" indicator on the left side, and the "more controls" link on the right +will respond with the developer context menu. + # Building for Distribution ## Docker Build Environment diff --git a/package.nw/lib/roster.js b/package.nw/lib/roster.js index 06ec4d3..3139cbe 100644 --- a/package.nw/lib/roster.js +++ b/package.nw/lib/roster.js @@ -3844,6 +3844,7 @@ function handleContextMenu(ev) g_clearIgnoresCall.label = "Clear Ignore"; g_clearIgnoresCall.enabled = false; } + len = Object.keys(g_blockedDxcc).length; if (len > 0) { @@ -3861,6 +3862,7 @@ function handleContextMenu(ev) g_clearDxccIgnore.label = "Clear Ignore"; g_clearDxccIgnore.enabled = false; } + len = Object.keys(g_blockedCQ).length; if (len > 0) { @@ -3877,8 +3879,20 @@ function handleContextMenu(ev) g_clearCQIgnore.label = "Clear Ignore"; g_clearCQIgnore.enabled = false; } + if (typeof ev.target != "undefined") { + if (g_developerMode) + { + if ((ev.target.id === "ShowMoreControlsLink") || + (ev.target.id === "ShowFewerControlsLink") || + (ev.target.id === "txrxdec")) + { + // Allow event to bubble up so that NWJS will show the developer menu + return true; + } + } + var name = ev.target.getAttribute("name"); if (name == "Callsign") { @@ -3929,10 +3943,7 @@ function handleContextMenu(ev) } } - if (!g_developerMode) - { - ev.preventDefault(); - } + ev.preventDefault(); return false; }