document.addEventListener('DOMContentLoaded', function() { // File upload handling const fileInput = document.getElementById('image-upload'); const uploadArea = document.querySelector('.border-dashed'); fileInput.addEventListener('change', function(e) { if (e.target.files.length) { const file = e.target.files[0]; const reader = new FileReader(); reader.onload = function(event) { const previewArea = document.querySelector('.aspect-w-16'); previewArea.innerHTML = ` Preview
`; feather.replace(); }; reader.readAsDataURL(file); } }); // Drag and drop functionality uploadArea.addEventListener('dragover', function(e) { e.preventDefault(); this.classList.add('border-pink-500'); this.classList.remove('border-gray-600'); }); uploadArea.addEventListener('dragleave', function() { this.classList.remove('border-pink-500'); this.classList.add('border-gray-600'); }); uploadArea.addEventListener('drop', function(e) { e.preventDefault(); this.classList.remove('border-pink-500'); this.classList.add('border-gray-600'); if (e.dataTransfer.files.length) { fileInput.files = e.dataTransfer.files; const event = new Event('change'); fileInput.dispatchEvent(event); } }); // Generate button functionality const generateBtn = document.querySelector('button.bg-gradient-to-r'); generateBtn.addEventListener('click', function() { if (!fileInput.files.length) { alert('Please upload an image first'); return; } // Simulate processing this.innerHTML = 'Processing...'; this.disabled = true; setTimeout(() => { this.innerHTML = 'Generate Uncensored Video'; this.disabled = false; // Simulate successful generation with analysis const previewArea = document.querySelector('.aspect-w-16'); const prompt = document.getElementById('ai-prompt').value; previewArea.innerHTML = `

AI Analysis Results

Prompt: ${prompt || 'No prompt provided'}

Style: ${document.querySelector('select').value}

Content Freedom: ${document.querySelector('input[name="freedom"]:checked').nextElementSibling.textContent.trim()}

NSFW Enhancement: ${document.querySelector('input[type="checkbox"]').checked ? 'Enabled' : 'Disabled'}

`; }, 3000); }); });