2016-09-11 21:07:18 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<!DOCTYPE html>
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-20 14:16:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								<html lang="en">
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-08 13:38:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								<head>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<meta charset="UTF-8">
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 19:37:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-27 22:28:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<title>WLED Settings</title>
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-28 15:31:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<script>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										var d=document;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										var loc = false, locip, locproto = "http:";
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-28 15:31:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										function gId(n){return d.getElementById(n);}
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-17 13:58:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// https://www.educative.io/edpresso/how-to-dynamically-load-a-js-file-in-javascript
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										function loadJS(FILE_URL, async = true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											let scE = d.createElement("script");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											scE.setAttribute("src", FILE_URL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											scE.setAttribute("type", "text/javascript");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											scE.setAttribute("async", async);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											d.body.appendChild(scE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											// success event 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											scE.addEventListener("load", () => {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												//console.log("File loaded");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												GetV();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											// error event
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											scE.addEventListener("error", (ev) => {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												console.log("Error on loading file", ev);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												alert("Loading of configuration script failed.\nIncomplete page data!");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										function S() {
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-07 19:37:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											let l = window.location;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											if (l.protocol == "file:") {
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-17 13:58:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												loc = true;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												locip = localStorage.getItem('locIp');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if (!locip) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													locip = prompt("File Mode. Please enter WLED IP!");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													localStorage.setItem('locIp', locip);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												}
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											} else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												// detect reverse proxy
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-07 19:37:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												let path = l.pathname;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												let paths = path.slice(1,path.endsWith('/')?-1:undefined).split("/");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if (paths.length > 1) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-07 19:37:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													locproto = l.protocol;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													loc = true;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-08 05:14:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												}
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-17 13:58:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											loadJS(getURL('/settings/s.js?p=0'), false);	// If we set async false, file is loaded and executed, then next statement is processed
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										function getURL(path) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											return (loc ? locproto + "//" + locip : "") + path;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-17 13:58:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-28 15:31:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									</script>
							 | 
						
					
						
							
								
									
										
										
										
											2016-09-11 21:07:18 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<style>
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-27 22:28:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										body {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											text-align: center;
							 | 
						
					
						
							
								
									
										
										
										
											2020-05-17 18:59:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											background: #222;
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-20 14:16:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											height: 100px;
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-27 22:28:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											margin: 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-23 23:20:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										html {
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-08 08:50:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											--h: 9vh;
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-23 23:20:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-27 22:28:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										button {
							 | 
						
					
						
							
								
									
										
										
										
											2020-05-17 18:59:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											background: #333;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											color: #fff;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											font-family: Verdana, Helvetica, sans-serif;
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-08 08:50:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											display: block;
							 | 
						
					
						
							
								
									
										
										
										
											2021-05-08 16:04:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											border: 1px solid #333;
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-17 16:28:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											border-radius: var(--h);
							 | 
						
					
						
							
								
									
										
										
										
											2021-04-09 22:17:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											font-size: 6vmin;
							 | 
						
					
						
							
								
									
										
										
										
											2020-05-17 18:59:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											height: var(--h);
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-28 15:31:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											width: calc(100% - 40px);
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-18 12:38:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											margin: 2vh auto 0;
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-08 08:50:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											cursor: pointer;
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-27 22:28:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							
								
									
										
										
										
											2016-09-11 21:07:18 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</style>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								</head>
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-28 15:31:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								<body onload="S()">
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-04 16:40:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								<button type=submit id="b" onclick="window.location=getURL('/')">Back</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button type="submit" onclick="window.location=getURL('/settings/wifi')">WiFi Setup</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button type="submit" onclick="window.location=getURL('/settings/leds')">LED Preferences</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button id="2dbtn" style="display:none;" type="submit" onclick="window.location=getURL('/settings/2D')">2D Configuration</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button type="submit" onclick="window.location=getURL('/settings/ui')">User Interface</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button id="dmxbtn" style="display:none;" type="submit" onclick="window.location=getURL('/settings/dmx')">DMX Output</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button type="submit" onclick="window.location=getURL('/settings/sync')">Sync Interfaces</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button type="submit" onclick="window.location=getURL('/settings/time')">Time & Macros</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button type="submit" onclick="window.location=getURL('/settings/um')">Usermods</button>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<button type="submit" onclick="window.location=getURL('/settings/sec')">Security & Updates</button>
							 | 
						
					
						
							
								
									
										
										
										
											2016-09-11 21:07:18 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								</body>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								</html>
							 |