-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscream.js
72 lines (62 loc) · 1.52 KB
/
scream.js
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
var output = '';
var intervalID = 0;
var aboutModal = document.getElementById("aboutModal")
function scream()
{
const textarea = document.getElementById('scream');
if (textarea.value != "") {
output = textarea.value;
textarea.value = '';
textarea.placeholder = '';
document.getElementById("thevoid").innerHTML = output;
output = '';
intervalID = 0;
document.getElementById("screamButton").disabled = true;
fadeout();
}
}
function fadeout()
{
intervalID = setInterval(hide, 200);
}
function hide()
{
var opacity = 0;
var voidDiv = document.getElementById("thevoid");
opacity = Number(window.getComputedStyle(voidDiv).getPropertyValue("opacity"));
if (opacity > 0) {
opacity = opacity - 0.02;
voidDiv.style.opacity = opacity;
} else {
clearInterval(intervalID);
document.getElementById("thevoid").innerHTML = "";
voidDiv.style.opacity = 1;
document.getElementById("screamButton").disabled = false;
}
}
function uwu()
{
const checkbox = document.getElementById('uwuOwo');
if (checkbox.checked) {
document.getElementById('screamButton').innerHTML = "screm";
} else {
document.getElementById('screamButton').innerHTML = "Scream";
}
}
function openNav()
{
document.getElementById("mySidenav").style.width = "300px";
}
function closeNav()
{
document.getElementById("mySidenav").style.width = "0";
}
function openAboutModal()
{
document.getElementById("aboutModal").style.display = "block";
closeNav();
}
function closeAboutModal()
{
document.getElementById("aboutModal").style.display = "none";
}