Skip to content

Commit

Permalink
Scanner enabled by right-click on the SQUELCH button.
Browse files Browse the repository at this point in the history
  • Loading branch information
luarvique committed May 11, 2023
1 parent f69f19e commit 64f539c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions htdocs/css/openwebrx.css
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,7 @@ img.openwebrx-mirror-img
100% { background: #00ff00; color: white; }
}

.openwebrx-scan-button {
color: #80ff80;
.openwebrx-squelch-auto {
animation-duration: 1s;
animation-iteration-count: infinite;
}
Expand Down
6 changes: 0 additions & 6 deletions htdocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@
<input title="Waterfall maximum level" id="openwebrx-waterfall-color-max" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(1);" oninput="updateVolume()">
</div>
</div>
<div class="openwebrx-section-divider" onclick="toggleSection(this);">&blacktriangledown;&nbsp;Scanner</div>
<div class="openwebrx-section">
<div class="openwebrx-panel-line">
<div class="openwebrx-button openwebrx-square-button openwebrx-scan-button" onclick="toggleScanner();" title="Scan bookmarks for signals">SCAN</div>
</div>
</div>
<div class="openwebrx-section-divider" onclick="toggleSection(this);">&blacktriangledown;&nbsp;Range</div>
<div class="openwebrx-section">
<div class="openwebrx-panel-line">
Expand Down
10 changes: 8 additions & 2 deletions htdocs/openwebrx.js
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,12 @@ function initSliders() {

return false;
});

// Enable scanner by pressing the right mouse button on SQUELCH
$('.openwebrx-squelch-auto').on('contextmenu', function() {
toggleScanner();
return false;
});
}

function digimodes_init() {
Expand Down Expand Up @@ -1712,12 +1718,12 @@ function toggleSpectrum() {
}

function stopScanner() {
$('.openwebrx-scan-button').css('animation-name', '');
$('.openwebrx-squelch-auto').css('animation-name', '');
scanner.stop();
}

function toggleScanner() {
var $scanButton = $('.openwebrx-scan-button');
var $scanButton = $('.openwebrx-squelch-auto');
var on = scanner.toggle();

$scanButton.css('animation-name', on? 'openwebrx-scan-animation' : '');
Expand Down

0 comments on commit 64f539c

Please sign in to comment.