zakladka ustawien

This commit is contained in:
Mateusz Gruszczyński
2025-10-21 12:02:29 +02:00
parent a363fb9ef8
commit 45a6ab7249

View File

@@ -50,6 +50,16 @@
});
});
form.querySelectorAll(".reset-one").forEach(btn => {
btn.addEventListener("click", () => {
const name = btn.getAttribute("data-target");
const input = form.querySelector(`input[name="${name}"]`);
if (!input) return;
input.value = "";
updatePreview(input);
});
});
resetAllBtn?.addEventListener("click", () => {
form.querySelectorAll('input[type="color"].category-color').forEach(input => {
input.value = "";
@@ -63,6 +73,10 @@
input.addEventListener("change", () => updatePreview(input));
});
form.addEventListener("submit", () => {
form.querySelectorAll('input[type="color"].category-color').forEach(updatePreview);
});
(function () {
const slider = document.getElementById("ocr_sensitivity");
const badge = document.getElementById("ocr_sens_badge");