Smart Email & Message Prioritization Tool

Smart Email & Message Prioritization Tool

Automatically sort your communications by urgency and importance.

Step 1: Input Messages

Step 2: Review Prioritized Messages

Manage Prioritization Keywords

Add or remove keywords to fine-tune the prioritization logic. The more keywords a message contains, the higher its score.

Urgent Keywords

Important Keywords

Low Priority Keywords

Ignore Keywords

No messages in this category.

'}
`).join(''); downloadPdfBtn.disabled = false; } // --- EVENT HANDLERS & HELPERS --- function handleAddKeyword(e) { if (e.key === 'Enter' && e.target.classList.contains('keyword-input')) { const type = e.target.dataset.type; const value = e.target.value.trim().toLowerCase(); if (value && !keywords[type].includes(value)) { keywords[type].push(value); e.target.value = ''; renderAllConfig(); } } } function handleDeleteKeyword(e) { if (e.target.tagName === 'BUTTON' && e.target.dataset.type) { const { type, keyword } = e.target.dataset; keywords[type] = keywords[type].filter(kw => kw !== keyword); renderAllConfig(); } } function generatePdf() { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-content'); const pdfTitleEl = document.getElementById('pdf-title'); if (!pdfContent || downloadPdfBtn.disabled) return; pdfTitleEl.textContent = 'Prioritized Message List'; html2canvas(pdfContent, { scale: 2, useCORS: true, logging: false }) .then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const ratio = canvas.width / canvas.height; const imgHeight = (pdfWidth - 20) / ratio; pdf.addImage(imgData, 'PNG', 10, 10, pdfWidth - 20, imgHeight); pdf.save('Prioritized-Messages.pdf'); pdfTitleEl.textContent = ''; }); } // --- EVENT LISTENERS --- function addEventListeners() { tabButtons.forEach(button => { button.addEventListener('click', () => { const tab = button.dataset.tab; tabButtons.forEach(btn => btn.classList.toggle('active', btn.dataset.tab === tab)); tabContents.forEach(content => content.classList.toggle('active', content.id.startsWith(tab))); }); }); prioritizeBtn.addEventListener('click', prioritizeMessages); configContainer.addEventListener('keypress', handleAddKeyword); configContainer.addEventListener('click', handleDeleteKeyword); downloadPdfBtn.addEventListener('click', generatePdf); } initialize(); });
Scroll to Top