File size: 905 Bytes
734ecb4
 
 
 
 
 
 
 
 
 
 
2e3504d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
---
title: Hackertyper
emoji: 💻
colorFrom: blue
colorTo: pink
sdk: static
pinned: false
license: mit
short_description: How HackerTyper.app Works
---


---

### 6. README.md for **hackertyper.app**

```markdown
# HackerTyper.app

A playful website that simulates hacker-style typing when any key is pressed.

## How it works

JavaScript listens to keydown events and reveals code character by character.

### Demo snippet

```html
<div id="screen" style="font-family: monospace; background: black; color: #0f0; padding: 1rem; height: 200px; overflow-y: auto;"></div>

<script>
const screen = document.getElementById('screen');
const code = "console.log('Hello Hacker!');\nfunction test() { return true; }\n";
let index = 0;

document.addEventListener('keydown', () => {
  if (index < code.length) {
    screen.textContent += code[index++];
    screen.scrollTop = screen.scrollHeight;
  }
});
</script>