Key Sequencing
This commit is contained in:
parent
eca198e8ce
commit
478d203755
23
Key Sequence [12-30]/index.html
Normal file
23
Key Sequence [12-30]/index.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Key Detection</title>
|
||||||
|
<script type="text/javascript" src="https://www.cornify.com/js/cornify.js"></script>
|
||||||
|
<link rel="icon" href="https://fav.farm/🔥" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
const pressed = [];
|
||||||
|
const secretCode = 'worlddrknss';
|
||||||
|
|
||||||
|
window.addEventListener('keyup', (e)=> {
|
||||||
|
pressed.push(e.key);
|
||||||
|
pressed.splice(-secretCode.length -1, pressed.length - secretCode.length);
|
||||||
|
if(pressed.join('').includes(secretCode)){
|
||||||
|
cornify_add();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user