1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

lotta bugfixes

This commit is contained in:
Marek Farkaš
2025-04-19 21:49:11 +02:00
parent cbefdb7c1f
commit 9f5f0522bb
15 changed files with 82 additions and 35 deletions

View File

@@ -722,7 +722,6 @@ function checkKey(e) {
// Handle default case if needed
break;
}
previousFreq = currentFreq;
}
}
@@ -1190,13 +1189,25 @@ function initTooltips(target = null) {
});
}
function fillPresets() {
let hasAnyPreset = false;
for (let i = 1; i <= 4; i++) {
let presetText = localStorage.getItem(`preset${i}`);
$(`#preset${i}-text`).text(presetText);
$(`#preset${i}`).click(function() {
tuneTo(Number(presetText));
});
if (presetText != "null") {
hasAnyPreset = true;
$(`#preset${i}-text`).text(presetText);
$(`#preset${i}`).click(function() {
tuneTo(Number(presetText));
});
} else {
$(`#preset${i}`).hide();
}
}
}
if (!hasAnyPreset) {
$('#preset1').parent().hide();
}
}