From 1effa25402e6c9ac1273d88d0ae87e47cd0f8acb Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 15 Jun 2019 15:20:31 +0200 Subject: [PATCH] Fix javascript error Fix javascript error --- sonoff/xdrv_01_webserver.ino | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 0653908e2..5f8714ffe 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -140,12 +140,10 @@ const char HTTP_SCRIPT_RELOAD_OTA[] PROGMEM = "setTimeout(function(){location.href='.';}," STR(HTTP_OTA_RESTART_RECONNECT_TIME) ");"; const char HTTP_SCRIPT_CONSOL[] PROGMEM = - "var sn=0;" // Scroll position - "var id=0;" // Get most of weblog initially + "var sn=0,id=0;" // Scroll position, Get most of weblog initially "function l(p){" // Console log and command service - "var c,o,t;" + "var c,o='',t;" "clearTimeout(lt);" - "o='';" "t=eb('t1');" "if(p==1){" "c=eb('c1');" @@ -278,7 +276,7 @@ const char HTTP_SCRIPT_INFO_END[] PROGMEM = "wl(i);"; 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');" "while(i.length>=t){" "if(i[t]){" @@ -287,7 +285,7 @@ const char HTTP_HEAD_LAST_SCRIPT[] PROGMEM = "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 ""; const char HTTP_HEAD_STYLE1[] PROGMEM =