reset
This commit is contained in:
parent
01eb76ec27
commit
bc541424a4
|
|
@ -412,17 +412,32 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("colorReset").onclick = () => {
|
document.getElementById("colorReset").onclick = () => {
|
||||||
|
|
||||||
const defaults = {
|
const defaults = {
|
||||||
hdmi_brightness: 0,
|
hdmi_brightness: {
|
||||||
hdmi_contrast: 1,
|
value: 0,
|
||||||
hdmi_saturation: 1,
|
span: "brightnessVal"
|
||||||
hdmi_hue: 0
|
},
|
||||||
|
hdmi_contrast: {
|
||||||
|
value: 1,
|
||||||
|
span: "contrastVal"
|
||||||
|
},
|
||||||
|
hdmi_saturation: {
|
||||||
|
value: 1,
|
||||||
|
span: "saturationVal"
|
||||||
|
},
|
||||||
|
hdmi_hue: {
|
||||||
|
value: 0,
|
||||||
|
span: "hueVal"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const id in defaults) {
|
for (const id in defaults) {
|
||||||
const el = document.getElementById(id);
|
const el = document.getElementById(id);
|
||||||
el.value = defaults[id];
|
el.value = defaults[id].value;
|
||||||
document.getElementById(id + "Val").textContent = defaults[id];
|
document.getElementById(defaults[id].span).textContent = defaults[id].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
update();
|
update();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue