2020-12-29 09:53:15 +00:00
|
|
|
const char HTTP_SCRIPT_TEMPLATE[] PROGMEM =
|
|
|
|
"function ld(u,f){"
|
|
|
|
"var x=new XMLHttpRequest();"
|
2022-04-03 11:30:07 +01:00
|
|
|
"x.onreadystatechange=()=>{"
|
2022-04-08 09:23:10 +01:00
|
|
|
"if(x.readyState==4&&x.status==200){"
|
|
|
|
"f(x);"
|
2020-12-29 09:53:15 +00:00
|
|
|
"}"
|
|
|
|
"};"
|
|
|
|
"x.open('GET',u,true);"
|
|
|
|
"x.send();"
|
|
|
|
"}"
|
|
|
|
"var c;" // Need a global for BASE
|
|
|
|
"function x1(b){"
|
|
|
|
"var i,j,g,k,o;"
|
|
|
|
"o=b.responseText.split(/}1/);" // Field separator
|
|
|
|
"k=o.shift();" // Template name
|
|
|
|
"if(eb('s1').value==''){"
|
|
|
|
"eb('s1').value=k;" // Set NAME if not yet set
|
|
|
|
"}"
|
|
|
|
"g=o.shift().split(',');" // GPIO - Array separator
|
|
|
|
"os=\""; // }2'0'>None (0)}3}2'17'>Button1 (17)}3...
|