phpMyAdminHoneypot/functions.js

20 lines
441 B
JavaScript
Raw Normal View History

2022-05-26 22:32:27 +03:00
document.addEventListener('DOMContentLoaded', function () {
checkErrors();
}, false);
function checkErrors() {
if (isFormSubmitted()) {
showErrors();
}
}
function isFormSubmitted() {
return window.location.href[window.location.href.length - 1] == "#";
}
function showErrors() {
x = document.getElementsByClassName('error');
for (let i = 0; i < x.length; i++) {
x[i].style.display = 'block';
}
}