File size: 2,290 Bytes
e580779
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

// Age verification
function showAgeVerification() {
    const verification = document.createElement('div');
    verification.className = 'age-verification';
    verification.innerHTML = `
        <div class="age-verification-content">
            <h2>Age Verification</h2>
            <p>This website contains adult content and is only suitable for those who are 18 years or older. By entering, you confirm that you are at least 18 years of age or the legal age in your jurisdiction to view such material.</p>
            <div class="age-verification-buttons">
                <button class="age-verification-btn enter">I am 18 or older - Enter</button>
                <button class="age-verification-btn exit">I am under 18 - Exit</button>
            </div>
        </div>
    `;
    
    document.body.appendChild(verification);
    
    verification.querySelector('.enter').addEventListener('click', () => {
        document.body.removeChild(verification);
        document.cookie = "age_verified=true; max-age=2592000; path=/"; // 30 days
    });
    
    verification.querySelector('.exit').addEventListener('click', () => {
        window.location.href = "https://www.google.com";
    });
}

// Check if age is already verified
if (document.cookie.indexOf('age_verified=true') === -1) {
    showAgeVerification();
}

document.addEventListener('DOMContentLoaded', () => {
// Smooth scrolling for anchor links
    document.querySelectorAll('a[href^="#"]').forEach(anchor => {
        anchor.addEventListener('click', function (e) {
            e.preventDefault();
            document.querySelector(this.getAttribute('href')).scrollIntoView({
                behavior: 'smooth'
            });
        });
    });

    // Animation on scroll
    const animateOnScroll = () => {
        const elements = document.querySelectorAll('.animate-on-scroll');
        elements.forEach(element => {
            const elementPosition = element.getBoundingClientRect().top;
            const screenPosition = window.innerHeight / 1.3;
            
            if (elementPosition < screenPosition) {
                element.classList.add('animate-fadeIn');
            }
        });
    };

    window.addEventListener('scroll', animateOnScroll);
    animateOnScroll(); // Run once on load
});