SEO PRO Tool — Image Compressor + Image SEO + Content SEO + Pro Table
Image Compressor & SEO
Pro Table Editor
Add row
Add col
Export CSV
Built: Client-side — No files uploaded to servers
Preview
Meta HTML
Table HTML
SEO Report
Post Preview
(title)
(meta description)
`
}
// SEO Analyzer (basic heuristics)
analyzeBtn.addEventListener('click', ()=>{
const title = postTitle.value||''; const desc = postDesc.value||''; const kw = (focusKW.value||'').toLowerCase();
const score = seoHeuristic({title,desc,kw});
seoReport.innerHTML = `
Score: ${score.total}/100
${score.reasons.map(r=>`${escapeHtml(r)} `).join('')} `;
// switch to SEO tab
tabs.forEach(t=>t.classList.remove('active')); document.querySelector('[data-tab="seo"]').classList.add('active'); document.querySelectorAll('#contentArea > div.card').forEach(c=>c.style.display='none'); el('#seo').style.display='block';
});
function seoHeuristic({title,desc,kw}){
const reasons=[]; let total=100;
if(!title){reasons.push('Missing title'); total-=30;} else if(title.length<30){reasons.push('Title short (under 30 chars)'); total-=5}
if(!desc){reasons.push('Missing meta description'); total-=20} else if(desc.length>160){reasons.push('Meta description long (over 160 chars)'); total-=5}
if(kw){
if(title.toLowerCase().includes(kw)) total+=5; else reasons.push('Keyword not found in title');
if(desc.toLowerCase().includes(kw)) total+=5; else reasons.push('Keyword not found in description');
} else {reasons.push('No focus keyword specified'); total-=10}
// image alt
if(!(imageTitle.value)){reasons.push('Image alt/title missing'); total-=5}
total = Math.max(10, Math.min(100,total));
return {total,reasons};
}
// utils
function escapeHtml(s){ if(s==null) return ''; return s.toString().replace(/&/g,'&').replace(//g,'>') }
// slug auto-generate
postTitle.addEventListener('input',()=>{slug.value = generateSlug(postTitle.value)});
function generateSlug(s){return (s||'').toLowerCase().trim().replace(/[^a-z0-9\s-]/g,'').replace(/\s+/g,'-').replace(/-+/g,'-')}
// simple copy/paste safety
function downloadBlob(b, name){ const url=URL.createObjectURL(b); const a=document.createElement('a'); a.href=url; a.download=name; a.click(); }
// helper: on load, set defaults
(function init(){ linkColor.value = '#0ea5e9'; imageLink.value = ''; postTitle.value = 'Example Post Title'; postDesc.value = 'Write a concise meta description here (<=160 chars).'; focusKW.value = 'focus keyword'; })();
Comments
Post a Comment