lotta bugfixes

This commit is contained in:
Marek Farkaš
2025-04-19 21:49:19 +02:00
parent cbefdb7c1f
commit 9f5f0522bb
15 changed files with 82 additions and 35 deletions
+18 -7
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();
}
}