Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion apache/botcheck.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ <h1>Are you Human?</h1>
</div>

<script>
document.getElementsByTagName('form')[0].addEventListener('submit', (ev) => {
var humanForm = document.getElementsByTagName('form')[0];

humanForm.addEventListener('submit', (ev) => {
ev.preventDefault();
// Set cookie for 30 days
const expires = new Date();
Expand All @@ -82,6 +84,14 @@ <h1>Are you Human?</h1>
// Reload the page to continue with original request
window.location.reload();
});

onMovement = (event) => {
humanForm.getElementsByTagName("button")[0].click();
}

addEventListener("deviceorientation", onMovement);
addEventListener("devicemotion", onMovement);
addEventListener("mousemove", onMovement);
</script>
</body>
</html>