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=()=>{"
|
2020-12-29 09:53:15 +00:00
|
|
|
"if(this.readyState==4&&this.status==200){"
|
|
|
|
"f(this);"
|
|
|
|
"}"
|
|
|
|
"};"
|
|
|
|
"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...
|