-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
159 lines (139 loc) · 5.76 KB
/
script.js
File metadata and controls
159 lines (139 loc) · 5.76 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
let easterEggCount = 0;
let tuxClickCount = 0;
const tuxClicked = () => {
tuxClickCount++;
if (tuxClickCount >= 10) {
triggerGrubReboot();
}
}
const triggerGrubReboot = () => {
const grubScreen = document.getElementById('grub-screen');
const grubContent = document.getElementById('grub-content');
grubScreen.classList.add('active');
document.body.style.overflow = 'hidden';
const bootSequence = [
{ text: 'Booting...', delay: 500 },
{ text: '\nGNU GRUB version 2.04', delay: 800 },
{ text: '\n\nLoading Linux 6.18.0 ...', delay: 1000 },
{ text: '\nLoading initial ramdisk ...', delay: 1200 },
{ text: '\n\n[ 0.000000] Linux version 6.18.0 (user@developer-machine)', delay: 1500 },
{ text: '\n[ 0.001234] Command line: BOOT_IMAGE=/vmlinuz root=/dev/sda1', delay: 1700 },
{ text: '\n[ 0.003456] Kernel panic - not syncing: VFS: Unable to mount root fs', delay: 2000 },
{ text: '\n[ 0.004567] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.16.0', delay: 2200 },
{ text: '\n[ 0.005678] Hardware name: Developer Machine/Terminal Portfolio', delay: 2400 },
{ text: '\n\n<span style="color: #ff0000;">ERROR: Root filesystem failed to mount!</span>', delay: 2800 },
{ text: '\n<span style="color: #ff0000;">Kernel panic - not syncing: Attempted to kill init!</span>', delay: 3200 },
{ text: '\n\n<span style="color: #ffff00; font-size: 16px; font-weight: bold;">Bailing out, you are on your own. Good luck.</span>', delay: 4000 },
{ text: '\n\n<span style="color: #888;">[System will reboot in 5 seconds...]</span>', delay: 5500 }
];
grubContent.innerHTML = '';
bootSequence.forEach((step, index) => {
setTimeout(() => {
grubContent.innerHTML += step.text;
grubContent.scrollTop = grubContent.scrollHeight;
if (index === bootSequence.length - 1) {
setTimeout(() => {
grubScreen.style.transition = 'opacity 1s';
grubScreen.style.opacity = '0';
setTimeout(() => {
window.location.reload();
}, 1000);
}, 2000);
}
}, step.delay);
});
}
const showEasterEgg = (id) => {
const egg = document.getElementById(id);
if (egg.style.display === 'block') {
egg.style.display = 'none';
} else {
egg.style.display = 'block';
easterEggCount++;
checkAchievement();
}
}
const runSL = () => {
const output = document.getElementById('easter-output');
output.style.display = 'block';
output.innerHTML = `sh: sl: command not found
Did you mean: ls
<span class="help-text"># I always do this (((.</span>`;
easterEggCount++;
checkAchievement();
}
const runCowsay = () => {
const output = document.getElementById('easter-output');
output.style.display = 'block';
output.innerHTML = ` _______________________________________________________________
< An idiot admires complexity, a genius admires simplicity,
a physicist tries to make it simple, for an idiot anything
the more complicated it is the more he will admire it, if
you make something so clusterf***ed he can't understand it
he's gonna think you're a god cause you made it so complicated
nobody can understand it. That's how they write journals in Academics
, they try to make it so complicated people think you're a genius! >
---------------------------------------------------------------
\\ ^__^
\\ (oo)\\_______
(__)\\ )\\/\\
||----w |
|| ||`;
easterEggCount++;
checkAchievement();
}
const runFortune = () => {
const fortunes = [
"Your code will compile on the first try today!",
"A bug is just a feature you haven't documented yet. - Javascript creator, probably",
"npm install left-pad.",
"Senior programmer will just leave LGTM on your PR today!.",
"404: Fortune not found. Wait, here it is!"
];
const output = document.getElementById('easter-output');
output.style.display = 'block';
output.textContent = fortunes[Math.floor(Math.random() * fortunes.length)];
easterEggCount++;
checkAchievement();
}
const runMatrix = () => {
const output = document.getElementById('easter-output');
output.style.display = 'block';
output.innerHTML =
`<span style="color: #00ff00;">Wake up, Neo...
The Matrix has you...
Follow the white rabbit.</span>
<span class="help-text"># cmatrix - displays falling characters like in The Matrix</span>`;
easterEggCount++;
checkAchievement();
}
const checkAchievement = () => {
if (easterEggCount >= 5) {
const output = document.getElementById('easter-output');
output.style.display = 'block';
output.innerHTML =
`<span style="color: #ffff00;">
🏆 ACHIEVEMENT UNLOCKED! 🏆
"sudo do something"
(this command opens a random video in downloads folder
on my pc when i run it lol)
You found all the easter eggs!
Access Level: ROOT
Permission: GRANTED
Status: Ascended</span>`;
}
}
let konamiCode = [];
const konamiSequence = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a'];
document.addEventListener('keydown', (e) => {
konamiCode.push(e.key);
konamiCode = konamiCode.slice(-10);
if (konamiCode.join(',') === konamiSequence.join(',')) {
document.body.style.transform = 'rotate(360deg)';
document.body.style.transition = 'transform 2s';
setTimeout(() => {
alert('🎮 Konami Code activated! You are probably 40+ (jk lol i love my boomers)!');
document.body.style.transform = 'rotate(0deg)';
}, 2000);
}
});