Only show CW functions if using SSL and only when mode is CW

这个提交包含在:
Peter Goodhall 2023-08-01 16:18:56 +01:00
父节点 3e43e613c2
当前提交 59689f80cc
共有 2 个文件被更改,包括 32 次插入1 次删除

查看文件

@ -516,7 +516,7 @@
<div id="qsomap" style="width: 100%; height: 200px;"></div>
</div>
<div class="card winkey-settings">
<div id="winkey" class="card winkey-settings">
<div class="card-header">
<h4 style="font-size: 16px; font-weight: bold;" class="card-title">Winkey

查看文件

@ -1,3 +1,34 @@
// Lets see if CW is selected
const ModeSelected = document.getElementById('mode');
if (location.protocol == 'http:') {
// Do something if the page is being served over SSL
$('#winkey').hide(); // Hide the CW buttons
}
if (ModeSelected.value == 'CW') {
// Show the CW buttons
$('#winkey').show();
} else {
// Hide the CW buttons
$('#winkey').hide();
}
ModeSelected.addEventListener('change', (event) => {
if (event.target.value == 'CW') {
// Show the CW buttons
$('#winkey').show();
} else {
// Hide the CW buttons
$('#winkey').hide();
}
});
let function1Name, function1Macro, function2Name, function2Macro, function3Name, function3Macro, function4Name, function4Macro, function5Name, function5Macro;
getMacros();