-
Notifications
You must be signed in to change notification settings - Fork 0
/
yes.html
145 lines (124 loc) · 4.32 KB
/
yes.html
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>You have successfully signed up</title>
</head>
<link rel="stylesheet" href="/styles/styles.css">
<style>
@font-face {
font-family: mlhFont;
src: url('./media/mlhfont.ttf');
}
body {
background: #222;
color: #f0f0f0;
font-family: mlhFont !important;
}
#messenger {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-family: mlhFont;
font-size: 20px;
white-space: nowrap;
text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9);
}
</style>
<div id="messenger"></div>
<center><span id="viewAll" onclick="transcripter()">View Transcript</span></center>
<body id="body">
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
let timer;
let Messenger = function(el) {
'use strict';
let m = this;
m.init = function() {
m.codeletters = "&#*+%?£@§$";
m.message = 0;
m.current_length = 0;
m.fadeBuffer = false;
m.messages = [
'Lez Git It!',
'You have You Have Successfully Signed Up for',
'HackSB',
'See you at the South Brunsiwck High School',
'On April 4th - 5th'
];
setTimeout(m.animateIn, 100);
};
m.generateRandomString = function(length) {
let random_text = '';
while (random_text.length < length) {
random_text += m.codeletters.charAt(Math.floor(Math.random() * m.codeletters.length));
}
return random_text;
};
m.animateIn = function() {
if (m.current_length < m.messages[m.message].length) {
m.current_length = m.current_length + 2;
if (m.current_length > m.messages[m.message].length) {
m.current_length = m.messages[m.message].length;
}
let message = m.generateRandomString(m.current_length);
$(el).html(message);
setTimeout(m.animateIn, 20);
} else {
setTimeout(m.animateFadeBuffer, 20);
}
};
m.animateFadeBuffer = function() {
if (m.fadeBuffer === false) {
m.fadeBuffer = [];
for (let i = 0; i < m.messages[m.message].length; i++) {
m.fadeBuffer.push({
c: (Math.floor(Math.random() * 12)) + 1,
l: m.messages[m.message].charAt(i)
});
}
}
let do_cycles = false;
let message = '';
for (let i = 0; i < m.fadeBuffer.length; i++) {
let fader = m.fadeBuffer[i];
if (fader.c > 0) {
do_cycles = true;
fader.c--;
message += m.codeletters.charAt(Math.floor(Math.random() * m.codeletters.length));
} else {
message += fader.l;
}
}
$(el).html(message);
if (do_cycles === true) {
setTimeout(m.animateFadeBuffer, 50);
} else {
setTimeout(m.cycleText, 2000);
}
};
m.cycleText = function() {
m.message = m.message + 1;
if (m.message >= m.messages.length) {
m.message = 0;
}
m.current_length = 0;
m.fadeBuffer = false;
$(el).html('');
timer = setTimeout(m.animateIn, 200);
};
m.init();
}
console.clear();
let lInE_11 = 'aeuumcsefkxulctitkpnimmgoetciz';
let transcripter = () => {
document.getElementById('body').innerHTML = `<center> Lez Git It! <br> 'You Have Successfully Signed Up For', <br> 'HackSB', <br> 'See you at the South Brunswick High School', <br> 'On April 4th - 5th', </center>`;
// clearTimeout(timer);
},
messenger = new Messenger($('#messenger'));
</script>
</html>