-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
42 lines (37 loc) · 1.07 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html>
<head>
<style>
body {
background-color: #000;
color: #00ff00;
font-family: "Courier New", monospace;
font-size: 42px;
height: 100vh;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<h1 id="hackerText">Hacked</h1>
<script>
const textElement = document.getElementById('hackerText');
const originalText = textElement.innerHTML;
function scrambleText() {
let scrambledText = '';
for (let i = 0; i < originalText.length; i++) {
if (Math.random() < 0.5) {
scrambledText += String.fromCharCode(Math.random() * 94 + 33);
} else {
scrambledText += originalText[i];
}
}
scrambledText = scrambledText.substring(0, originalText.length);
textElement.innerHTML = scrambledText;
}
setInterval(scrambleText, 50);
</script>
</body>
</html>