diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 8eed7b54f..e71e4016d 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -58,6 +58,9 @@ const char HTTP_HEAD[] PROGMEM = "function eb(s){" "return document.getElementById(s);" // Save code space "}" + "function qs(s){" // Alias to save code space + "return document.querySelector(s);" + "}" "function idn(){" "var t=0,i=document.querySelectorAll('input,button,textarea,select'); while(i.length>=t){ if(i[t]) {i[t]['name']=(i[t].hasAttribute('id')&&(!i[t].hasAttribute('name')))?i[t]['id']:i[t]['name'];}t++;}" "}" @@ -319,7 +322,7 @@ const char HTTP_FORM_TEMPLATE_FLAG[] PROGMEM = const char HTTP_FORM_MODULE[] PROGMEM = "