Update anti_ddos_challenge.lua

Remove junk javascript code.

Change the timer text element to inform the user to refresh their page incase their browser blocks it. (Firefox is a prime culprit of this "firefox prevented this page from automatically reloading")
This commit is contained in:
C0nw0nk
2020-01-26 18:46:15 +00:00
committed by GitHub
parent 0f1fcf8fc1
commit 20d6640a27

View File

@ -634,10 +634,8 @@ local javascript_anti_ddos = [[
//end javascript puzzle //end javascript puzzle
var xhttp = new XMLHttpRequest(); var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() { xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == ]] .. expected_header_status .. [[) { //status may be 503 so local var to control both response and switch between POST and GET document.getElementById("status").innerHTML = "Refresh your page.";
location.reload(true); location.reload(true);
document.getElementById("status").innerHTML = "Refresh your page.";
}
}; };
xhttp.open("]] .. javascript_REQUEST_TYPE .. [[", "]] .. request_uri .. [[", true); xhttp.open("]] .. javascript_REQUEST_TYPE .. [[", "]] .. request_uri .. [[", true);
]] .. javascript_REQUEST_headers .. [[ ]] .. javascript_REQUEST_headers .. [[