File size: 1,735 Bytes
615132b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
document.addEventListener('DOMContentLoaded', function() {
    // Simulate detection process
    simulateDetection();
    
    // Add event listeners for buttons
    document.querySelectorAll('button').forEach(button => {
        button.addEventListener('click', function() {
            const text = this.textContent.trim();
            if (text.includes('Skip AI Sections')) {
                showNotification('Skipping detected AI sections in the video...');
            } else if (text.includes('Not Interested')) {
                showNotification('We won\'t recommend similar AI-generated content in the future.');
            } else if (text.includes('Learn More')) {
                showNotification('Opening information about AI content detection...');
            }
        });
    });
});

function simulateDetection() {
    const detectionElements = document.querySelectorAll('[class*="text-red-"]');
    detectionElements.forEach(el => {
        el.style.opacity = '0';
    });
    
    setTimeout(() => {
        detectionElements.forEach((el, index) => {
            setTimeout(() => {
                el.style.transition = 'opacity 0.5s ease';
                el.style.opacity = '1';
            }, index * 150);
        });
    }, 500);
}

function showNotification(message) {
    const notification = document.createElement('div');
    notification.className = 'plugin-notification bg-gray-800 text-white px-6 py-3 rounded-lg shadow-lg flex items-center';
    notification.innerHTML = `
        <i data-feather="info" class="mr-3"></i>
        <span>${message}</span>
    `;
    document.body.appendChild(notification);
    feather.replace();
    
    setTimeout(() => {
        notification.remove();
    }, 3000);
}