Search Campaigns
Display Campaigns
Video Campaigns
Performance Max
🔍 Your Google Ads AI Strategy
📚 Generated Strategies History
`;
promptResults.appendChild(card);
resultsSection.style.display = "block";
historySection.style.display = "none";
});
historyItems.appendChild(historyItem);
});
}
function toggleHistory() {
if (historySection.style.display === "block") {
historySection.style.display = "none";
historyBtn.textContent = "History";
} else {
historySection.style.display = "block";
resultsSection.style.display = "none";
historyBtn.textContent = "Hide History";
}
}
function toggleAdvancedOptions() {
if (advancedOptions.classList.contains('active')) {
advancedOptions.classList.remove('active');
toggleAdvanced.textContent = "▼ Show Advanced Options";
} else {
advancedOptions.classList.add('active');
toggleAdvanced.textContent = "▲ Hide Advanced Options";
}
}
function switchTab(tab) {
currentTab = tab;
tabs.forEach(t => t.classList.remove('active'));
document.querySelector(`.tab[data-tab="${tab}"]`).classList.add('active');
updatePromptStyleVisibility();
}
function updatePromptStyleVisibility() {
const promptStyle = document.getElementById('prompt-style');
promptStyle.style.display = currentTab === 'search' ? 'block' : 'none';
}
function clearForm() {
formInputs.forEach(input => {
if (input.type !== 'checkbox') {
input.value = '';
}
});
resultsSection.style.display = "none";
historySection.style.display = "none";
}
function escapeHtml(unsafe) {
return unsafe
.replace(/&/g, "&")
.replace(//g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
}
});
// Global functions
function copyToClipboard(text) {
navigator.clipboard.writeText(text)
.then(() => alert("Prompt copied! Paste into ChatGPT/Claude."))
.catch(() => alert("Failed to copy."));
}
function generateAdCopy(niche, audience) {
const adCopyPrompt = `Generate 5 high-converting Google Ads copy variations for ${niche} targeting ${audience}. For each variation:
1. Use a different psychological trigger (urgency, social proof, etc.)
2. Include a strong CTA
3. Keep under 90 characters for headlines, 150 for descriptions
4. Highlight unique value propositions
Format as:
Headline 1 | Headline 2 | Headline 3
Description
--------------------`;
copyToClipboard(adCopyPrompt);
alert("Ad copy prompt copied! Paste into your AI tool to generate variations.");
}