Enter your topic

Key points to add to your content

Content type

Tone

Number of sections

'; const sourceHTML = header + htmlContent + footer; blob = new Blob(['\ufeff', sourceHTML], { type: 'application/msword' }); url = URL.createObjectURL(blob); a = document.createElement('a'); a.href = url; a.download = `${topic} (ChatLabs AI Outline Generator).doc`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } }); // Check on page load if we should show the popup (function checkInitialState() { const usageCount = parseInt(localStorage.getItem('outlineGeneratorUsage') || '0'); const lastUsageTime = parseInt(localStorage.getItem('outlineGeneratorLastUsage') || '0'); if (usageCount >= 2 && lastUsageTime > 0) { const currentTime = Math.floor(Date.now() / 1000); const timeElapsed = currentTime - lastUsageTime; const cooldownPeriod = 5 * 60; // 5 minutes if (timeElapsed < cooldownPeriod) { const remainingTime = cooldownPeriod - timeElapsed; limitPopup.classList.remove('hidden'); startCountdown(remainingTime); } else { // Cooldown expired, reset localStorage.setItem('outlineGeneratorUsage', '0'); localStorage.removeItem('outlineGeneratorLastUsage'); } } })(); });