Work Day Calculator

SEO Content Utility

Word Count
0
Reading Time
0 min
Top Keywords Density:
function runSeoAnalysis() { var text = document.getElementById('seo-text-input').value; if (!text.trim()) return; var words = text.trim().toLowerCase().replace(/[.,!?;:()"]/g, "").split(/\s+/).filter(function(w) { return w.length > 2; }); var wordCount = words.length; var readTime = Math.ceil(wordCount / 200); var counts = {}; for (var i = 0; i 3) { counts[word] = (counts[word] || 0) + 1; } } var sortedWords = []; for (var key in counts) { sortedWords.push([key, counts[key]]); } sortedWords.sort(function(a, b) { return b[1] – a[1]; }); var densityHtml = '
    '; var limit = Math.min(sortedWords.length, 5); for (var j = 0; j < limit; j++) { var percentage = ((sortedWords[j][1] / wordCount) * 100).toFixed(1); densityHtml += '
  • ' + sortedWords[j][0] + '' + sortedWords[j][1] + ' (' + percentage + '%)
  • '; } densityHtml += '
'; document.getElementById('res-word-count').innerHTML = wordCount; document.getElementById('res-read-time').innerHTML = readTime + ' min'; document.getElementById('res-keywords').innerHTML = densityHtml; document.getElementById('seo-results-box').style.display = 'block'; } function clearSeoTool() { document.getElementById('seo-text-input').value = "; document.getElementById('seo-results-box').style.display = 'none'; }

Leave a Comment