-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04c5a61
commit 4afd08f
Showing
16 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="favicon icon" href="assets/favicon.ico" type="image/x-icon" /> | ||
<link rel="stylesheet" href="src/style.css" /> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<h1><span>></span>:</h1> | ||
<input type="text" class="input" maxlength="15" /> | ||
</div> | ||
|
||
<script src="src/script.js"></script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
document.title = 108 | ||
const input = document.querySelector('input') | ||
|
||
const siren = new Audio('assets/siren.mp3') | ||
const type = new Audio('assets/type.mp3') | ||
const reset = new Audio('assets/reset.mp3') | ||
const tick = new Audio('assets/tick.mp3') | ||
|
||
const typeSound = () => { | ||
let randomNumber = Math.floor(Math.random() * 7) | ||
switch (randomNumber) { | ||
case 0: | ||
new Audio('assets/typing_sounds/button1.mp3').play() | ||
break | ||
case 1: | ||
new Audio('assets/typing_sounds/button2.mp3').play() | ||
break | ||
case 2: | ||
new Audio('assets/typing_sounds/button3.mp3').play() | ||
break | ||
case 3: | ||
new Audio('assets/typing_sounds/button4.mp3').play() | ||
break | ||
case 4: | ||
new Audio('assets/typing_sounds/button5.mp3').play() | ||
break | ||
case 5: | ||
new Audio('assets/typing_sounds/button6.mp3').play() | ||
break | ||
case 6: | ||
new Audio('assets/typing_sounds/button7.mp3').play() | ||
break | ||
case 7: | ||
new Audio('assets/typing_sounds/button8.mp3').play() | ||
} | ||
} | ||
|
||
input.onkeydown = (event) => { | ||
typeSound() | ||
if (event.key == 'Enter') { | ||
input.value.trim() | ||
if (input.value == '4 8 15 16 23 42') { | ||
document.title = 108 | ||
input.value = '' | ||
siren.pause() | ||
siren.currentTime = 0 | ||
reset.play() | ||
} else if (input.value == 'terminate') { | ||
document.title = 4 | ||
input.value = '' | ||
siren.play() | ||
} else { | ||
input.value = '' | ||
} | ||
} | ||
} | ||
|
||
setInterval(() => { | ||
document.title-- | ||
if (document.title <= 4) { | ||
siren.play() | ||
} | ||
tick.play() | ||
}, 60000) | ||
|
||
setInterval(() => { | ||
input.focus() | ||
}, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
* { | ||
padding: 0; | ||
margin: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
background-color: rgb(0, 0, 0); | ||
color: rgba(0, 247, 0, 0.75); | ||
font: 1rem Courier New, monospace; | ||
height: 100vh; | ||
overflow: hidden; | ||
text-shadow: 0 0 5px rgba(56, 255, 56, 0.75); | ||
} | ||
|
||
.container { | ||
align-items: center; | ||
display: flex; | ||
justify-content: flex-start; | ||
margin: 0.3rem 0 0 0.8rem; | ||
padding: 40px; | ||
} | ||
|
||
.input { | ||
background-color: rgb(0, 0, 0); | ||
border: none; | ||
color: rgba(0, 247, 0, 0.75); | ||
font-family: Courier New, monospace; | ||
font-size: 3.2rem; | ||
font-weight: bold; | ||
margin-left: 0.5rem; | ||
margin-top: 0.5rem; | ||
outline: none; | ||
text-shadow: 0 0 5px rgba(56, 255, 56, 0.75); | ||
} | ||
|
||
h1 { | ||
display: inline-block; | ||
font-size: 3.8rem; | ||
letter-spacing: -4px; | ||
} | ||
|
||
span { | ||
font-size: 3rem; | ||
} |