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 = `
${message}
`;
document.body.appendChild(notification);
feather.replace();
setTimeout(() => {
notification.remove();
}, 3000);
}