mirror of
https://github.com/seigler/fhqwhgads
synced 2025-07-27 06:46:10 +00:00
added working contrast buttons
This commit is contained in:
parent
bb350b07e9
commit
a1f356adc0
12 changed files with 164 additions and 92 deletions
|
@ -20,15 +20,27 @@
|
|||
}
|
||||
var commandline = document.getElementById("command");
|
||||
commandline.value = "";
|
||||
commandline.oninput = syncTyping;
|
||||
commandline.onkeydown = syncTyping;
|
||||
commandline.onkeyup = syncTyping;
|
||||
commandline.onselect = syncTyping;
|
||||
commandline.onfocus = syncTyping;
|
||||
commandline.focus();
|
||||
document.onmousedown = function() {
|
||||
document.body.onmousedown = function() {
|
||||
commandline.focus();
|
||||
return false;
|
||||
};
|
||||
var brightness = 0;
|
||||
function alterBrightness(delta) {
|
||||
brightness = Math.max(0, Math.min(1, brightness + delta));
|
||||
document.getElementById("scanlines").style.backgroundColor = "hsl(120, 100%, " + 16 * brightness + "%)";
|
||||
}
|
||||
document.getElementById("knobup").onmousedown = function() {
|
||||
alterBrightness(.0625);
|
||||
};
|
||||
document.getElementById("knobdown").onmousedown = function() {
|
||||
alterBrightness(-.0625);
|
||||
};
|
||||
function handleForm() {
|
||||
var history = document.getElementById("history");
|
||||
var val = this.command.value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue