unbound-video-forge / script.js
Spyda573's picture
A working ai video generater with no legal or moral restriction
9d19840 verified
Raw
History Blame Contribute Delete
1.36 kB
document.addEventListener('DOMContentLoaded', () => {
// Animation for generate button
const generateBtn = document.querySelector('button[class*="bg-primary-500"]');
if (generateBtn) {
generateBtn.addEventListener('click', () => {
generateBtn.innerHTML = '<i data-feather="loader" class="animate-spin mr-2"></i> Generating...';
feather.replace();
// Simulate generation time
setTimeout(() => {
generateBtn.innerHTML = '<i data-feather="zap" class="mr-2"></i> Generate Video';
feather.replace();
// Show success toast
showToast('Video generated successfully!', 'success');
}, 3000);
});
}
});
function showToast(message, type = 'info') {
const toast = document.createElement('div');
toast.className = `fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-lg text-white ${
type === 'success' ? 'bg-green-600' : 'bg-blue-600'
} animate-fade-in-up`;
toast.textContent = message;
document.body.appendChild(toast);
setTimeout(() => {
toast.classList.remove('animate-fade-in-up');
toast.classList.add('animate-fade-out-down');
setTimeout(() => {
toast.remove();
}, 300);
}, 3000);
}