mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-23 07:29:20 -08:00
Javascript compatibility with old browser. Thanks to @benjenq
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -75,7 +75,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
function getResults(reload = false){
|
||||
function getResults(reload){
|
||||
if(reload === undefined){
|
||||
reload = false;
|
||||
}
|
||||
getResponse("ClientScanResults.json",function(responseText){
|
||||
res = JSON.parse(responseText);
|
||||
res.clients = res.clients.sort(compare);
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
function getResponse(adr, callback, timeoutCallback = function(){location.reload()}, timeout = 8000){
|
||||
function getResponse(adr, callback, timeoutCallback, timeout){
|
||||
if(timeoutCallback === undefined) {
|
||||
timeoutCallback = function(){
|
||||
location.reload()
|
||||
};
|
||||
}
|
||||
if(timeout === undefined) {
|
||||
timeout = 8000;
|
||||
}
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if(xmlhttp.readyState == 4){
|
||||
|
||||
Reference in New Issue
Block a user