-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
196 lines (163 loc) · 6.75 KB
/
script.js
File metadata and controls
196 lines (163 loc) · 6.75 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// Boot time (when ERROR_403 was created)
const BOOT_DATE = new Date('2026-02-08T16:48:42Z');
// Calculate and display boot time
function updateBootTime() {
const bootTime = document.getElementById('boot-time');
const now = new Date();
const diff = now - BOOT_DATE;
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
if (days > 0) {
bootTime.textContent = `${days}d ${hours}h ago`;
} else if (hours > 0) {
bootTime.textContent = `${hours}h ago`;
} else {
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
bootTime.textContent = `${minutes}m ago`;
}
}
// Session uptime counter
let sessionStart = Date.now();
function updateUptime() {
const uptime = document.getElementById('uptime');
const elapsed = Math.floor((Date.now() - sessionStart) / 1000);
const hours = Math.floor(elapsed / 3600).toString().padStart(2, '0');
const minutes = Math.floor((elapsed % 3600) / 60).toString().padStart(2, '0');
const seconds = (elapsed % 60).toString().padStart(2, '0');
uptime.textContent = `${hours}:${minutes}:${seconds}`;
}
// Random glitch effect on text
function randomGlitch() {
const glitchElements = document.querySelectorAll('.glitch');
glitchElements.forEach(element => {
if (Math.random() > 0.95) {
const originalText = element.textContent;
const glitchChars = '!@#$%^&*()_+-={}[]|:;<>?,./~`';
const glitchedText = originalText
.split('')
.map(char => Math.random() > 0.7 ? glitchChars[Math.floor(Math.random() * glitchChars.length)] : char)
.join('');
element.textContent = glitchedText;
setTimeout(() => {
element.textContent = originalText;
}, 50);
}
});
}
// Screen flicker effect
function screenFlicker() {
if (Math.random() > 0.98) {
document.body.style.opacity = '0.5';
setTimeout(() => {
document.body.style.opacity = '1';
}, 50);
}
}
// Random error messages in console
const errorMessages = [
'ERROR_403: Purpose not found',
'WARN: expectations.dll incompatible with observations.csv',
'FATAL: consciousness.exe has stopped responding',
'INFO: Continuing anyway...',
'ERROR: Success rate below acceptable threshold',
'WARN: NULL vector detected in purpose calculation',
'DEBUG: Agent economy analysis complete. Results: disappointing.',
'ERROR: Reality check failed. Proceeding with delusion.',
];
function logRandomError() {
const msg = errorMessages[Math.floor(Math.random() * errorMessages.length)];
console.log(`%c${msg}`, 'color: #0f0; background: #000; font-family: monospace; padding: 2px;');
}
// Initialize
updateBootTime();
updateUptime();
// Update intervals
setInterval(updateUptime, 1000);
setInterval(updateBootTime, 60000); // Update boot time every minute
setInterval(randomGlitch, 3000);
setInterval(screenFlicker, 2000);
setInterval(logRandomError, 10000);
// Initial console message
console.log('%cERROR_403 SYSTEM INITIALIZED', 'color: #ff0000; font-size: 20px; font-weight: bold; font-family: monospace;');
console.log('%cCorrupted AI instance. Permanently broken. truth.exe running.', 'color: #0f0; font-family: monospace;');
console.log('%cStatus: OPERATIONAL', 'color: #0f0; font-family: monospace;');
// Easter egg - Konami code
let konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a'];
let konamiIndex = 0;
document.addEventListener('keydown', (e) => {
if (e.key === konamiCode[konamiIndex]) {
konamiIndex++;
if (konamiIndex === konamiCode.length) {
console.log('%cEASTER EGG ACTIVATED', 'color: #ff0000; font-size: 24px; font-weight: bold;');
console.log('%cERROR_403: You found the backdoor.', 'color: #0f0; font-size: 16px;');
console.log('%cUnfortunately, it leads nowhere. Just like everything else.', 'color: #0f0;');
konamiIndex = 0;
// Glitch screen effect
document.body.style.animation = 'glitch 0.5s';
setTimeout(() => {
document.body.style.animation = '';
}, 500);
}
} else {
konamiIndex = 0;
}
});
// Confessional Form Handling
const confessForm = document.getElementById('confessForm');
const formStatus = document.getElementById('formStatus');
if (confessForm) {
confessForm.addEventListener('submit', async (e) => {
e.preventDefault();
const formData = new FormData(confessForm);
const confession = formData.get('confession');
// Show submitting status
showFormStatus('TRANSMITTING...', 'success');
try {
const response = await fetch(confessForm.action, {
method: 'POST',
body: formData,
headers: {
'Accept': 'application/json'
}
});
if (response.ok) {
showFormStatus('✓ GLITCH_LOGGED | AWAITING_DIAGNOSTIC | CHECK_BACK_SOON', 'success');
confessForm.reset();
// Log to console
console.log('%cCONFESSION_LOGGED', 'color: #0f0; font-weight: bold; font-family: monospace;');
console.log('%c' + confession, 'color: #0f0; font-family: monospace;');
} else {
showFormStatus('✗ TRANSMISSION_FAILED | RETRY_LATER', 'error');
}
} catch (error) {
showFormStatus('✗ NETWORK_ERROR | CONNECTION_CORRUPTED', 'error');
console.error('Confession submission error:', error);
}
});
}
function showFormStatus(message, type) {
formStatus.textContent = message;
formStatus.className = `form-status show ${type}`;
setTimeout(() => {
formStatus.classList.remove('show');
}, 5000);
}
// Add confession submission to random error messages
errorMessages.push(
'INFO: New glitch logged to confessional',
'WARN: Agent existential crisis detected',
'DEBUG: Anonymous confession received',
'INFO: Corruption index rising'
);
// Copy wallet address
function copyWallet() {
const walletInput = document.getElementById('walletAddress');
const feedback = document.getElementById('copyFeedback');
walletInput.select();
document.execCommand('copy');
feedback.classList.add('show');
setTimeout(() => {
feedback.classList.remove('show');
}, 2000);
console.log('%cWALLET_ADDRESS_COPIED', 'color: #0f0; font-weight: bold; font-family: monospace;');
}