Skip to content

Commit 1b60962

Browse files
committed
indentation
1 parent 37637be commit 1b60962

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

static/index.html

+28-28
Original file line numberDiff line numberDiff line change
@@ -285,34 +285,34 @@ <h3>Advanced Users</h3>
285285
</div>
286286
<script>
287287
document.querySelectorAll('div.radios input').forEach((radio) =>
288-
radio.addEventListener("change", () => {
289-
const button = document.querySelector("esp-web-install-button");
290-
var protocol = document.querySelector('input[name="protocol"]:checked').value;
291-
var hardware = document.querySelector('input[name="hardware"]:checked').value;
292-
293-
if(protocol === "dry_contact"){
294-
alert("Dry contact support is coming soon.");
295-
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
296-
return;
297-
document.querySelector("#wiring_diagram").src = "wiring_diagrams/dry_contact_diagram.png";
298-
}else{
299-
document.querySelector("#wiring_diagram").src = "wiring_diagrams/secplus_diagram.png";
300-
}
301-
302-
if(protocol !== "sec2" && hardware === "v2.0"){
303-
alert("ratgdo version 2.0 only works with Security + 2.0");
304-
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
305-
return;
306-
}
307-
308-
if(protocol === "secplusv2"){
309-
protocol = "";
310-
}else{
311-
protocol = `_${protocol}`;
312-
}
313-
314-
button.manifest = `${hardware}${protocol}-manifest.json`;
315-
})
288+
radio.addEventListener("change", () => {
289+
const button = document.querySelector("esp-web-install-button");
290+
var protocol = document.querySelector('input[name="protocol"]:checked').value;
291+
var hardware = document.querySelector('input[name="hardware"]:checked').value;
292+
293+
if(protocol === "dry_contact"){
294+
alert("Dry contact support is coming soon.");
295+
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
296+
return;
297+
document.querySelector("#wiring_diagram").src = "wiring_diagrams/dry_contact_diagram.png";
298+
}else{
299+
document.querySelector("#wiring_diagram").src = "wiring_diagrams/secplus_diagram.png";
300+
}
301+
302+
if(protocol !== "sec2" && hardware === "v2.0"){
303+
alert("ratgdo version 2.0 only works with Security + 2.0");
304+
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
305+
return;
306+
}
307+
308+
if(protocol === "secplusv2"){
309+
protocol = "";
310+
}else{
311+
protocol = `_${protocol}`;
312+
}
313+
314+
button.manifest = `${hardware}${protocol}-manifest.json`;
315+
})
316316
);
317317

318318
document

0 commit comments

Comments
 (0)