Claude Sonnet 4 Live
⚡ Page Configuration
🧩 Modules
🤖
Configure a service page above and run the agent.
Results will appear here.
')} `; outputArea.appendChild(schemaCard); } // Content card if (doContent && results.content) { const c = safeJSON(results.content); if (c) { const contentCard = document.createElement('div'); contentCard.className = 'result-card'; const faqs = (c.faqSection || []).map(f => `
${f.q || ''}
${f.a || ''}
`).join(''); const headings = (c.h2Headings || []).map((h,i) => `
H${i+2}
${h}
`).join(''); contentCard.innerHTML = `
✍️ AEO-Optimized Content
${c.answerParagraph || ''}
${headings}
${c.introSection || ''}
${faqs}
${c.metaDescription || ''}
`; outputArea.appendChild(contentCard); } } // Gap card if (doGap && results.gap) { const g = safeJSON(results.gap); if (g) { const gapCard = document.createElement('div'); gapCard.className = 'result-card'; gapCard.innerHTML = `
🔍 Content Gap Analysis
${(g.missingQuestions||[]).length} gaps found
${g.quickWins ? `
Quick wins — add these now
${g.quickWins.map(w => `
✓ ${w}
`).join('')}
` : ''}
Missing questions to answer on this page
${(g.missingQuestions||[]).map((q,i) => `
${i+1}
${q}
`).join('')} ${g.contentGaps ? `
Topic areas needing dedicated sections
${g.contentGaps.map(gap => `
📌 ${gap}
`).join('')}` : ''}
`; outputArea.appendChild(gapCard); } } // Implementation guide const guideCard = document.createElement('div'); guideCard.className = 'result-card'; guideCard.innerHTML = `
🚀 Implementation Guide
Next.js
Files to update
${[ ['app/' + url.replace(/^\//, '') + '/page.tsx', 'Add answer paragraph + FAQ section + H2 headings'], ['app/layout.tsx or page.tsx head', 'Add JSON-LD schema in <script> tag'], ['app/sitemap.ts', 'Confirm page URL is listed ✓'], ['app/robots.ts', 'Already configured ✓'], ].map(([file, desc]) => `
${file}
${desc}
`).join('')}
`; outputArea.appendChild(guideCard); } function switchTab(btn, panelId) { btn.closest('.result-body').querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active')); btn.closest('.result-body').querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active')); btn.classList.add('active'); document.getElementById(panelId).classList.add('active'); } function formatJSON(raw) { try { const clean = raw.replace(/```json\n?/g,'').replace(/```\n?/g,'').trim(); const obj = JSON.parse(clean); return escHtml(JSON.stringify(obj, null, 2)); } catch(e) { return escHtml(raw); } } function escHtml(str) { return str.replace(/&/g,'&').replace(//g,'>'); } function copyText(id) { const el = document.getElementById(id); const text = el.innerText; navigator.clipboard.writeText(text).then(() => { const btn = el.closest('.result-card').querySelector('.copy-btn'); btn.textContent = 'Copied!'; setTimeout(() => btn.textContent = 'Copy', 1500); }); } function copyAllContent() { const panels = ['tab-answer','tab-headings','tab-body','tab-faq','tab-meta']; let all = ''; panels.forEach(id => { const el = document.getElementById(id); if (el) all += el.innerText + '\n\n---\n\n'; }); navigator.clipboard.writeText(all).then(() => { const btns = document.querySelectorAll('.copy-btn'); btns.forEach(b => { if(b.textContent === 'Copy all') { b.textContent = 'Copied!'; setTimeout(()=>b.textContent='Copy all',1500); }}); }); }