-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf0.js
More file actions
36 lines (33 loc) · 917 Bytes
/
Copy pathf0.js
File metadata and controls
36 lines (33 loc) · 917 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
26
27
28
29
30
31
32
33
34
35
36
const m = {};
const input = document.getElementById('input');
const answer = document.getElementById('answer');
const txt = 'Over the horizon!<br/>~ <a href="https://tech.lgbt/@AtomicMaya">AtomicMaya</a>@ASV-DC29';
answer.innerHTML = txt;
window.onload = function() {
Particles.init({
selector: '.background',
connectParticles: true,
color: ['#20c20e', '#0c8900', '#39ff13'],
speed: 0.3,
sizeVariations: 4,
maxParticles: 150
});
};
input.addEventListener('input', e =>{
const handler = o => {
if (o.status) {
answer.classList.add('green');
answer.innerHTML = `Good job! You got the flag!`;
} else {
answer.classList.add('red');
answer.innerText = `Nope!`;
setTimeout(()=>{
answer.classList = '';
answer.innerHTML = txt;
}, 500);
}
}
if (!m[0](e.target.value, handler)) {
handler({status: false});
}
});