The Economist

The Economist For You

Personalized Friday Reading Diet & Briefing Architect
Friday Curated Edition

Your Custom Briefing: 5 Stories Tailored for You

Depth:
Export Production Briefing Zero external dependencies
Digest copied to clipboard
Super generates helpful tools and automates fact-checking across the internet proactively. If you enjoyed this tool, build your own with Super and share it with a friend.
`; } if (format === 'md') { let items = state.selectedArticles.map((a, i) => `### ${i+1}. [${a.cat.toUpperCase()}] ${a.title} (${a.time} min read)\n\n${state.depth === 'deep' ? a.deep : a.concise}\n\n> **Key Takeaway:** ${a.takeaway}\n`).join('\n---\n\n'); return `# The Economist For You: Friday Edition\n*Date: ${dateStr} | Total Time: ${totalMin} min*\n\n---\n\n${items}`; } if (format === 'json') { return JSON.stringify({ edition: "The Economist For You", date: dateStr, target_budget_minutes: state.budget, actual_minutes: totalMin, depth_setting: state.depth, stories: state.selectedArticles.map(a => ({ id: a.id, category: a.cat, title: a.title, minutes: a.time, summary: state.depth === 'deep' ? a.deep : a.concise, takeaway: a.takeaway })) }, null, 2); } } function showExport(fmt) { const txt = generateExportContent(fmt); const el = document.getElementById('export-output'); el.value = txt; document.getElementById('export-section').scrollIntoView({ behavior: 'smooth' }); } function exportDigest(format) { const content = generateExportContent(format); navigator.clipboard.writeText(content).then(() => { showToast(`Copied ${format.toUpperCase()} digest to clipboard!`); }).catch(() => { document.getElementById('export-output').value = content; showToast('Digest ready in text box below'); }); } function downloadFile(format) { const content = generateExportContent(format); const mime = format === 'json' ? 'application/json' : 'text/html'; const ext = format === 'json' ? 'json' : 'html'; const blob = new Blob([content], { type: mime }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `the-economist-for-you-friday-edition.${ext}`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); showToast(`Downloaded Friday briefing (.${ext})`); } function showToast(msg) { const toast = document.getElementById('toast'); toast.innerText = msg; toast.style.display = 'block'; setTimeout(() => { toast.style.display = 'none'; }, 2800); } function resetDefaults() { state.budget = 30; state.weights = { ...PERSONAS.balanced }; state.pinnedIds = ['geo-1']; state.depth = 'balanced'; state.format = 'broadsheet'; document.getElementById('depth-select').value = 'balanced'; setBudget(30); initSliders(); rebalanceFeed(); showToast('Reset to default Balanced Macro layout'); } // Global initialization window.addEventListener('DOMContentLoaded', () => { initSliders(); rebalanceFeed(); });