-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbare.html
More file actions
104 lines (99 loc) · 2.11 KB
/
bare.html
File metadata and controls
104 lines (99 loc) · 2.11 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="en" http-equiv="Content-Language" />
<meta content="notranslate" name="google" />
<title>WOPR Decryptor - Bare</title>
<link href="./dist/styles.css" rel="stylesheet" />
<style>
body {
margin: 0;
padding: 0;
background: #000;
font-family: 'Courier New', monospace;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
overflow: hidden;
}
#app {
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="module">
import { WOPRDecryptor } from './dist/index.js';
const wopr = new WOPRDecryptor({
container: document.getElementById('app'),
codes: ['CPE1704TKS', 'DEFCON-1', 'NORAD-ALPHA-7'],
charset: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
direction: 'random',
cycles: 1,
timing: {
durationMs: 10000,
tickInterval: 70,
},
audio: {
enabled: false,
volume: 0.12,
tickFreq: 180,
lockFreqStart: 900,
lockFreqStep: 12,
},
probability: {
enabled: false,
base: 2.3,
max: 99.9,
},
stream: {
enabled: false,
lines: 20,
width: 22,
},
ui: {
showHeader: false,
showFooter: false,
showProgress: false,
showOverlay: false,
blinkOnSolved: true,
blinkDuration: 0,
showCycles: false,
title: '',
},
});
let isRunning = true;
// Start immediately
wopr.start();
// Keyboard controls
window.addEventListener('keydown', (e) => {
if (e.key === 'r' || e.key === 'R') {
wopr.reset();
wopr.start();
isRunning = true;
}
if (e.key === 'n' || e.key === 'N') {
wopr.next();
wopr.start();
isRunning = true;
}
if (e.key === ' ') {
e.preventDefault();
if (isRunning) {
wopr.stop();
isRunning = false;
} else {
wopr.start();
isRunning = true;
}
}
});
</script>
</body>
</html>