518
| <![CDATA[<script>
//https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_loader5
function showPage() {
//document.getElementById("captcha-box").style.display = "none";
//document.getElementById("recaptcha_redirect").style.display = "block";
$('.captcha-box').hide();
$('.captcha-box.success').show();
window.location.replace('http://www.maraial.pe.gov.br/wp-admin?captcha');
}
function cooldown(element, start, stop, step, delay) {
var current = start;
//element.innerHTML = "(" + current + ")"
element.innerHTML = current;
var timer = setInterval(function () {
current -= step;
if (current < stop)
current = stop;
//element.innerHTML = "(" + current + ")";
element.innerHTML = current;
if (current == stop)
clearInterval(timer);
}, delay * 1000);
}
function reCaptcha() {
//event.preventDefault();
var ip = '150.164.203.80';
var realip = '';
var clientip = '150.164.203.80';
// needs for recaptacha ready
grecaptcha.ready(function () {
// do request for recaptcha token
// response is promise with passed token
grecaptcha.execute('6LeX9ZwUAAAAABVJlv9TuHQp2T3_Pho3T7kpwVI0', {action: 'unknown'}).then(function (token) {
$.post("/verify", {ip: ip, realip: realip, clientip: clientip, token: token}, function (result) {
//console.log(result);
if (result.success) {
var myVar;
myVar = setTimeout(showPage, 10000);
var box = document.getElementById("box");
cooldown(countdown, 10, 0, 1, 1);
//alert('Score:' + result.score + '(SUCCESS)')
} else {
$('.captcha-box').hide();
$('.captcha-box.fail').show();
//alert('Score:' + result.score + '(FAIL)')
}
});
});
;
});
}
</script>]]>
|