Your feedback helps us improve. Please share your experience with our tools.
Thank you for helping us improve!
// Generate dynamic buttons with links and icons const buttonContainer = document.getElementById('buttonContainer'); const buttonNames = [ { name: "Ai Text-to-Image/Video", icon: "fas fa-film" }, { name: "Ai Text-to-Speech", icon: "fas fa-volume-up" }, { name: "Image Resize & Compress", icon: "fas fa-expand-arrows-alt" }, { name: "Ai Professional Resume (CV)", icon: "fas fa-file-alt" }, { name: "HD Image Enhance Pro", icon: "fas fa-camera-retro" }, { name: "Background Image Remover", icon: "fas fa-eraser" }, { name: "Multi-function Calculators", icon: "fas fa-calculator" }, { name: "Image Converter", icon: "fas fa-exchange-alt" }, { name: "Ai Content Detector", icon: "fas fa-shield-alt" }, { name: "Universal File Converter & compressor", icon: "fas fa-file-pdf" }, { name: "Shorten URL", icon: "fas fa-link" }, { name: "Ultimate ContentGenius", icon: "fas fa-paint-brush" }, { name: "Ultimate Media Edit (Video Cut & Audio)", icon: "fas fa-crop" }, { name: "Ultimate Uni Convert Pro", icon: "fas fa-money-bill-wave" }, { name: "NEXUS Translator (Multi-language)", icon: "fas fa-globe" }, { name: "Railway Toolkit", icon: "fas fa-train" }, { name: "Word Counts", icon: "fas fa-file-word" }, { name: "Advanced Social Media Post", icon: "fas fa-share-alt" }, { name: "YT Metadata Pro", icon: "fab fa-youtube" } ]; const buttonLinks = [ "https://a2ztoolslibrary.com/imagevideo-gen/", "https://a2ztoolslibrary.com/text2audio/", "https://a2ztoolslibrary.com/magicimage/", "https://a2ztoolslibrary.com/professional-resume/", "https://a2ztoolslibrary.com/enhanced-img/", "https://a2ztoolslibrary.com/bg-remove/", "https://a2ztoolslibrary.com/multi-function-calculator/", "https://a2ztoolslibrary.com/img-convert/", "https://a2ztoolslibrary.com/aidetect/", "https://universalfileexport.blogspot.com/", "https://a2ztoolslibrary.com/shorten-url/", "https://a2ztoolslibrary.com/content-creator/", "https://a2ztoolslibrary.com/audio-video-cut/", "https://a2ztoolslibrary.com/uni-convert/", "https://a2ztoolslibrary.com/ai-translator/", "https://irctctool.blogspot.com/", "https://aiwordcounts.blogspot.com/", "https://postadvance.blogspot.com/", "https://ytmetadataextract.blogspot.com/" ];
buttonNames.forEach((button, index) => { const buttonElement = document.createElement('button'); buttonElement.className = 'design-button'; buttonElement.innerHTML = ` ${button.name} `; buttonElement.style.animation = `fadeInUp 0.7s ease ${index * 0.3}s forwards`; buttonElement.addEventListener('click', () => { window.location.href = buttonLinks[index]; // Open link in the same window }); buttonContainer.appendChild(buttonElement); });
// Slider functionality const paragraphs = document.querySelectorAll('.slider p'); let currentIndex = 0;
function showNextParagraph() { paragraphs[currentIndex].classList.remove('active'); currentIndex = (currentIndex + 1) % paragraphs.length; paragraphs[currentIndex].classList.add('active'); }
setInterval(showNextParagraph, 1500);
// Mobile menu toggle function toggleMenu() { const navLinks = document.querySelector('.nav-links'); navLinks.classList.toggle('active'); }
// Feedback Form Submission document.getElementById('feedbackForm').addEventListener('submit', function (e) { e.preventDefault(); // Prevent default form submission
const feedback = document.getElementById('feedback').value; const email = document.getElementById('email').value;
// Log feedback to console (replace with your backend logic) console.log('Feedback:', feedback); console.log('Email:', email);
// Show a thank-you message alert('Thank you for your feedback! We appreciate your input.');
// Clear the form document.getElementById('feedbackForm').reset();
// Close the feedback popup closeFeedbackForm(); });
// Open Feedback Form function openFeedbackForm() { document.getElementById('feedbackSection').classList.add('active'); document.getElementById('overlay').classList.add('active'); }
// Close Feedback Form function closeFeedbackForm() { document.getElementById('feedbackSection').classList.remove('active'); document.getElementById('overlay').classList.remove('active'); }
// Close Feedback Form when clicking outside document.getElementById('overlay').addEventListener('click', closeFeedbackForm);
// AI Bot Toggle function toggleAIBot() { const aiBotContainer = document.getElementById('aiBotContainer'); aiBotContainer.classList.toggle('active'); }
// AI Bot Functionality const chatContainer = document.getElementById('chatContainer'); const userInput = document.getElementById('userInput'); const sendBtn = document.getElementById('sendBtn'); const speakBtn = document.getElementById('speakBtn'); const synth = window.speechSynthesis; let isSpeaking = false; let recognition = null;
// Speech Recognition Setup const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; if (SpeechRecognition) { recognition = new SpeechRecognition(); recognition.continuous = false; recognition.interimResults = false; recognition.lang = 'en-US'; }
async function getGeminiResponse(prompt) { try { const response = await fetch(API_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: prompt }] }] }) }); const data = await response.json(); return data.candidates?.[0]?.content?.parts?.[0]?.text || "Your every need provides in the existing tools. Anything else, you can go to 'sOubhik AI'☝️ or Need any improvements go to 'Connect With Me'👇 directly."; } catch (error) { console.error('API Error:', error); return "I'm having trouble connecting right now. Please try again later."; } }
function addMessage(message, isUser = false) { const messageDiv = document.createElement('div'); messageDiv.className = `message ${isUser ? 'user-message' : 'bot-message'}`; messageDiv.textContent = message; chatContainer.appendChild(messageDiv); chatContainer.scrollTop = chatContainer.scrollHeight;
if (!isUser) { speakResponse(message); } }
function speakResponse(text) { if (isSpeaking) return; const utterance = new SpeechSynthesisUtterance(text); utterance.onstart = () => (isSpeaking = true); utterance.onend = () => (isSpeaking = false); synth.speak(utterance); }
async function handleSend() { const prompt = userInput.value.trim(); if (!prompt) return;
addMessage(prompt, true); userInput.value = ''; disableInputs(true);
const thinkingDiv = document.createElement('div'); thinkingDiv.className = 'message bot-message thinking'; thinkingDiv.innerHTML = `
Processing...`; chatContainer.appendChild(thinkingDiv); chatContainer.scrollTop = chatContainer.scrollHeight;
try { const response = await getGeminiResponse(prompt); chatContainer.removeChild(thinkingDiv); addMessage(response); } catch (error) { chatContainer.removeChild(thinkingDiv); addMessage("Sorry, I encountered an error. Please try again."); } disableInputs(false); userInput.focus(); }
function disableInputs(disabled) { userInput.disabled = disabled; sendBtn.disabled = disabled; speakBtn.disabled = disabled; }
// Hold-to-speak functionality if (recognition) { let isRecording = false;
speakBtn.addEventListener('mousedown', startRecording); speakBtn.addEventListener('touchstart', startRecording);
speakBtn.addEventListener('mouseup', stopRecording); speakBtn.addEventListener('touchend', stopRecording); speakBtn.addEventListener('touchcancel', stopRecording);
function startRecording(e) { e.preventDefault(); if (isRecording) return; isRecording = true; userInput.placeholder = "Listening..."; recognition.start(); }
function stopRecording() { if (!isRecording) return; isRecording = false; recognition.stop(); userInput.placeholder = "Ask me anything..."; }
recognition.onresult = (event) => { const transcript = event.results[0][0].transcript; userInput.value = transcript; handleSend(); };
recognition.onerror = () => { userInput.placeholder = "Ask me anything..."; addMessage("Sorry, I didn't catch that. Please try speaking again."); }; }
// Initial bot introduction setTimeout(() => { addMessage("Hello! I'm sOubhIk AI. How can I assist you today?", false); }, 1000);
// Event Listeners sendBtn.addEventListener('click', handleSend); userInput.addEventListener('keypress', (e) => e.key === 'Enter' && handleSend());
// Close Ad Functionality
function closeAd() {
const ad = document.getElementById('makeMoneyAd');
ad.style.display = 'none';
}