-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
25 lines (24 loc) · 812 Bytes
/
index.js
File metadata and controls
25 lines (24 loc) · 812 Bytes
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
var totalProgress = 0;
function hackNasa() {
if (totalProgress == 0) {
var progBar = document.getElementById('progress');
var progMeterBox = document.getElementById('prog-percent');
var foundOutReveal = document.getElementById('found-out');
var width = 0;
var progInt = setInterval(frame, 100);
function frame() {
if (width >= 100) {
alert("You can't Hack with HTML or CSS. Also...")
clearInterval(progInt);
progMeterBox.textContent = "Oh, You're in Trouble Now..."
foundOutReveal.style.display = "block";
} else {
width++;
progBar.style.width = width + "%";
progMeterBox.textContent = width + "%";
progMeterBox.style.visibility = "visible";
foundOutReveal.style.display = "none";
}
}
}
}