Skip to content
function fetchResults() { const question = document.getElementById('userQuestion').value.trim(); const responseContainer = document.getElementById('responseContainer'); if (question) { // Exibe uma mensagem de carregamento enquanto busca os resultados responseContainer.style.display = 'block'; responseContainer.textContent = 'Searching for the best options...'; // Simula a busca de resultados (substitua pela integração com IA ou banco de dados) setTimeout(function () { responseContainer.style.display = 'block'; // Verifica se o termo "fat burner" está na pergunta if (question.toLowerCase().includes('fat burner')) { responseContainer.innerHTML = ''; const title = document.createElement('h3'); title.textContent = `Results for: "${question}"`; responseContainer.appendChild(title); const description = document.createElement('p'); description.textContent = 'We found the following product for you:'; responseContainer.appendChild(description); const link = document.createElement('a'); link.href = 'https://your-affiliate-link.com'; link.target = '_blank'; link.style.color = '#1a73e8'; link.textContent = 'Best Fat Burner - Buy Now'; responseContainer.appendChild(link); } else { responseContainer.innerHTML = ''; const title = document.createElement('h3'); title.textContent = `No exact match found for: "${question}"`; responseContainer.appendChild(title); const description = document.createElement('p'); description.innerHTML = 'Try exploring our full product catalog.'; responseContainer.appendChild(description); } }, 2000); // Simula um carregamento de 2 segundos } else { alert('Please type a question before clicking Send.'); } }