diff --git a/wled00/data/index.htm b/wled00/data/index.htm index 2e9d6120c..d7ab40d15 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -6,6 +6,8 @@ strR = ""; strG = ""; strB = ""; + strNL = ""; + var nla = false; function Startup() { @@ -25,22 +27,24 @@ document.Ctrl_form.SR.value = this.responseXML.getElementsByTagName('cl')[0].childNodes[0].nodeValue; document.Ctrl_form.SG.value = this.responseXML.getElementsByTagName('cl')[1].childNodes[0].nodeValue; document.Ctrl_form.SB.value = this.responseXML.getElementsByTagName('cl')[2].childNodes[0].nodeValue; + nla = (this.responseXML.getElementsByTagName('nl')[0].innerHTML)!=0?true:false; + document.getElementsByClassName("desc")[0].innerHTML = this.responseXML.getElementsByTagName('desc')[0].innerHTML; UpdateVals(); } } } } // send HTTP request - request.open("GET", "win/" + strA + strR + strG + strB + nocache, true); + request.open("GET", "win/" + strA + strR + strG + strB + strNL + nocache, true); request.send(null); strA = ""; strR = ""; strG = ""; strB = ""; + strNL = ""; } function GetCheck() { - strA = "&A=" + Ctrl_form.SA.value; strR = "&R=" + Ctrl_form.SR.value; strG = "&G=" + Ctrl_form.SG.value; @@ -59,24 +63,42 @@ function UpdateVals() { document.body.style.background = lingrad(Ctrl_form.SR.value, Ctrl_form.SG.value, Ctrl_form.SB.value); + if (nla) { + nlb.style.fill="white"; + } else { + nlb.style.fill="black"; + } } function OpenSettings() { window.open("/settings","_self"); } - function ToggleNightMode() + function ToggleNl() { - + nla = !nla; + if (nla) { + strNL="&NL=1"; + } else { + strNL="&NL=0"; + } + UpdateVals(); + GetArduinoIO(); }
+ Loading...