mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-22 22:49:58 +01:00
Add files via upload
added the HTML files from the webinterface. To convert it into bytecode use minifier.html.
This commit is contained in:
13
htmlfiles/functions.js
Normal file
13
htmlfiles/functions.js
Normal file
@@ -0,0 +1,13 @@
|
||||
function getResponse(adr, callback, timeoutCallback = function(){alert("timeout error. Please reload the site");}, timeout = 3000){
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if(xmlhttp.readyState == 4){
|
||||
if(xmlhttp.status == 200) callback(xmlhttp.responseText);
|
||||
else timeoutCallback();
|
||||
}
|
||||
};
|
||||
xmlhttp.open("GET", adr, true);
|
||||
xmlhttp.send();
|
||||
xmlhttp.timeout = timeout;
|
||||
xmlhttp.ontimeout = timeoutCallback;
|
||||
}
|
||||
Reference in New Issue
Block a user