File size: 1,378 Bytes
6cd201c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
// Main script for undefined universe
document.addEventListener('DOMContentLoaded', function() {
    console.log('Welcome to the Undefined Universe! 🌀');
    
    // Add some undefined magic to the page
    const elements = document.querySelectorAll('.bg-undefined-500, .bg-undefined-600, .bg-undefined-700');
    
    elements.forEach(element => {
        element.addEventListener('mouseenter', function() {
            this.classList.add('undefined-glow', 'transition-all', 'duration-300');
        });
        
        element.addEventListener('mouseleave', function() {
            this.classList.remove('undefined-glow');
        });
    });
    
    // Add undefined animation to main heading
    const mainHeading = document.querySelector('h1');
    if (mainHeading) {
        mainHeading.classList.add('undefined-pulse');
    }
    
    // Random undefined color generator for fun
    const undefinedColors = ['bg-undefined-400', 'bg-undefined-500', 'bg-undefined-600', 'bg-undefined-700'];
    const randomElements = document.querySelectorAll('.bg-white');
    
    setInterval(() => {
        randomElements.forEach(element => {
            const randomColor = undefinedColors[Math.floor(Math.random() * undefinedColors.length)];
            element.classList.remove(...undefinedColors);
            element.classList.add(randomColor);
        });
    }, 3000);
});