Cleaning up indentations (sorry but my OCD is strong).

This commit is contained in:
Blaz Kristan 2021-11-27 11:50:18 +01:00
parent 624993fc89
commit 9f3e66fff0
2 changed files with 997 additions and 1004 deletions

View File

@ -191,8 +191,7 @@ function onLoad() {
if (window.location.protocol == "file:") {
loc = true;
locip = localStorage.getItem('locIp');
if (!locip)
{
if (!locip) {
locip = prompt("File Mode. Please enter WLED IP!");
localStorage.setItem('locIp', locip);
}
@ -310,8 +309,7 @@ function inforow(key, val, unit = "")
function getLowestUnusedP()
{
var l = 1;
for (var key in pJson)
{
for (var key in pJson) {
if (key == l) l++;
}
if (l > 250) l = 250;
@ -445,8 +443,7 @@ function populateQL()
cn += `<p class="labels">Quick load</p>`;
var it = 0;
for (var key of (pQL||[]))
{
for (var key of (pQL||[])) {
cn += `<button class="xxs btn psts" id="p${key[0]}qlb" onclick="setPreset(${key[0]});">${key[1]}</button>`;
it++;
if (it > 4) {
@ -518,8 +515,7 @@ function populateInfo(i)
else if (pwr > 0) {pwr = 50 * Math.round(pwr/50); pwru = pwr + " mA";}
var urows="";
if (i.u) {
for (const [k, val] of Object.entries(i.u))
{
for (const [k, val] of Object.entries(i.u)) {
if (val[1]) {
urows += inforow(k,val[0],val[1]);
} else {
@ -858,7 +854,6 @@ function updateTrail(e)
function updateBubble(e)
{
var bubble = e.target.parentNode.getElementsByTagName('output')[0];
if (bubble) {
bubble.innerHTML = e.target.value;
}
@ -1361,9 +1356,9 @@ function makeP(i,pl) {
var content = "";
if (pl) {
var rep = plJson[i].repeat ? plJson[i].repeat : 0;
content = `
<div class="first c">Playlist Entries</div>
<div id="ple${i}"></div><label class="check revchkl">
content = `<div class="first c">Playlist Entries</div>
<div id="ple${i}"></div>
<label class="check revchkl">
Shuffle
<input type="checkbox" id="pl${i}rtgl" onchange="plR(${i})" ${plJson[i].r?"checked":""}>
<span class="checkmark schk"></span>
@ -1394,8 +1389,7 @@ function makeP(i,pl) {
<span class="checkmark schk"></span>
</label>`;
return `
<input type="text" class="ptxt noslide" id="p${i}txt" autocomplete="off" maxlength=32 value="${(i>0)?pName(i):""}" placeholder="Enter name..."/><br>
return `<input type="text" class="ptxt noslide" id="p${i}txt" autocomplete="off" maxlength=32 value="${(i>0)?pName(i):""}" placeholder="Enter name..."/><br>
<div class="c">Quick load label: <input type="text" class="qltxt noslide" maxlength=2 value="${qlName(i)}" id="p${i}ql" autocomplete="off"/></div>
<div class="h">(leave empty for no Quick load button)</div>
<div ${pl&&i==0?"style='display:none'":""}>

File diff suppressed because it is too large Load Diff