Port bugfix.
This commit is contained in:
parent
daa3200713
commit
ccb0d491ed
@ -42,7 +42,7 @@
|
|||||||
if (paths.length > 1) {
|
if (paths.length > 1) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=0'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=0'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=10'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=10'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=7'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=7'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -562,7 +562,7 @@ Length: <input type="number" name="XC${i}" id="xc${i}" class="l" min="1" max="65
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=2'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=2'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=6'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=6'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=4'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=4'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=5'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=5'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -201,7 +201,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=3'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=3'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ldS();
|
ldS();
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
if (paths.length > 2) {
|
if (paths.length > 2) {
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = l.hostname+l.port+"/"+paths[0];
|
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadJS(getURL('/settings/s.js?p=1'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
loadJS(getURL('/settings/s.js?p=1'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||||
|
@ -159,22 +159,22 @@ function getURL(path) {
|
|||||||
}
|
}
|
||||||
async function onLoad()
|
async function onLoad()
|
||||||
{
|
{
|
||||||
if (window.location.protocol == "file:") {
|
let l = window.location;
|
||||||
|
if (l.protocol == "file:") {
|
||||||
loc = true;
|
loc = true;
|
||||||
locip = localStorage.getItem('locIp');
|
locip = localStorage.getItem('locIp');
|
||||||
if (!locip)
|
if (!locip) {
|
||||||
{
|
|
||||||
locip = prompt("File Mode. Please enter WLED IP!");
|
locip = prompt("File Mode. Please enter WLED IP!");
|
||||||
localStorage.setItem('locIp', locip);
|
localStorage.setItem('locIp', locip);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// detect reverse proxy and/or HTTPS
|
// detect reverse proxy and/or HTTPS
|
||||||
let l = window.location;
|
|
||||||
let pathn = l.pathname;
|
let pathn = l.pathname;
|
||||||
let paths = pathn.slice(1,pathn.endsWith('/')?-1:undefined).split("/");
|
let paths = pathn.slice(1,pathn.endsWith('/')?-1:undefined).split("/");
|
||||||
|
//while (paths[0]==="") paths.shift();
|
||||||
locproto = l.protocol;
|
locproto = l.protocol;
|
||||||
locip = l.hostname + (l.port ? ":" + l.port : "")
|
locip = l.hostname + (l.port ? ":" + l.port : "");
|
||||||
if (paths.length > 1) {
|
if (paths.length > 0 && paths[0]!=="") {
|
||||||
loc = true;
|
loc = true;
|
||||||
locip += "/" + paths[0];
|
locip += "/" + paths[0];
|
||||||
} else if (locproto==="https:") {
|
} else if (locproto==="https:") {
|
||||||
|
File diff suppressed because it is too large
Load Diff
2252
wled00/html_simple.h
2252
wled00/html_simple.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user