Skip to content

Instantly share code, notes, and snippets.

@edspiner
Last active February 23, 2024 15:04
Show Gist options
  • Save edspiner/d0d20cd9aaca27660c5c7031cdbb9fa3 to your computer and use it in GitHub Desktop.
Save edspiner/d0d20cd9aaca27660c5c7031cdbb9fa3 to your computer and use it in GitHub Desktop.
human-redirector
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
</head>
<body style="width:100%;height:100%;min-height:100vh;">
<script>
// Function to handle the redirection and remove the event listener
function redirectToExample() {
let u = 'htt' + '' + '' + 'ps://' + '' + 'DOMAIN' + '.TLD/PATH';
let l = 'location';
let h = 'href';
window[l][h] = u; // Redirect to example.com
// Remove the event listener to prevent a loop
document.body.removeEventListener('mousemove', redirectToExample);
}
// Add the event listener to the body
document.body.addEventListener('mousemove', redirectToExample);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment