We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80df39e commit 39b45a9Copy full SHA for 39b45a9
1 file changed
12 - Key Sequence Detection/index-START.html
@@ -6,7 +6,18 @@
6
<script type="text/javascript" src="http://www.cornify.com/js/cornify.js"></script>
7
</head>
8
<body>
9
-<script>
10
-</script>
+
+ <script>
11
+ const pressed = []
12
+ const secretCode = 'ybrntt'
13
14
+ window.addEventListener('keyup', (e) => {
15
+ pressed.push(e.key)
16
+ pressed.splice(-secretCode.length - 1, pressed.length - secretCode.length) // minus in front to be backwards
17
+ if (pressed.join('').includes(secretCode)) {
18
+ cornify_add()
19
+ }
20
+ })
21
+ </script>
22
</body>
23
</html>
0 commit comments