Fix javascript error

Fix javascript error
This commit is contained in:
Theo Arends 2019-06-15 15:20:31 +02:00
parent 03d69c2d99
commit 1effa25402

View File

@ -140,12 +140,10 @@ const char HTTP_SCRIPT_RELOAD_OTA[] PROGMEM =
"setTimeout(function(){location.href='.';}," STR(HTTP_OTA_RESTART_RECONNECT_TIME) ");"; "setTimeout(function(){location.href='.';}," STR(HTTP_OTA_RESTART_RECONNECT_TIME) ");";
const char HTTP_SCRIPT_CONSOL[] PROGMEM = const char HTTP_SCRIPT_CONSOL[] PROGMEM =
"var sn=0;" // Scroll position "var sn=0,id=0;" // Scroll position, Get most of weblog initially
"var id=0;" // Get most of weblog initially
"function l(p){" // Console log and command service "function l(p){" // Console log and command service
"var c,o,t;" "var c,o='',t;"
"clearTimeout(lt);" "clearTimeout(lt);"
"o='';"
"t=eb('t1');" "t=eb('t1');"
"if(p==1){" "if(p==1){"
"c=eb('c1');" "c=eb('c1');"
@ -278,7 +276,7 @@ const char HTTP_SCRIPT_INFO_END[] PROGMEM =
"wl(i);"; "wl(i);";
const char HTTP_HEAD_LAST_SCRIPT[] PROGMEM = const char HTTP_HEAD_LAST_SCRIPT[] PROGMEM =
"function id(){" // Add label name='' based on provided id='' "function jd(){" // Add label name='' based on provided id=''
"var t=0,i=document.querySelectorAll('input,button,textarea,select');" "var t=0,i=document.querySelectorAll('input,button,textarea,select');"
"while(i.length>=t){" "while(i.length>=t){"
"if(i[t]){" "if(i[t]){"
@ -287,7 +285,7 @@ const char HTTP_HEAD_LAST_SCRIPT[] PROGMEM =
"t++;" "t++;"
"}" "}"
"}" "}"
"wl(id);" // Add name='' to any id='' in input,button,textarea,select "wl(jd);" // Add name='' to any id='' in input,button,textarea,select
"</script>"; "</script>";
const char HTTP_HEAD_STYLE1[] PROGMEM = const char HTTP_HEAD_STYLE1[] PROGMEM =