Embed Widget
Add to your site
Copy and paste the code below to add a live-updating widget to your website or blog. It's free to use with attribution.
<div id="trump-golf-widget"></div>
<script>
(function() {
fetch('https://istrumpgolfing.today/stats.json')
.then(res => res.json())
.then(data => {
const widget = document.getElementById('trump-golf-widget');
widget.innerHTML = `
<div style="border: 1px solid #333; border-radius: 8px; padding: 15px; max-width: 300px; font-family: sans-serif; background: #1a1a1a; color: #fff;">
<h3 style="margin: 0 0 10px 0; color: #ffa500;">Trump Golf Tracker</h3>
<p style="margin: 5px 0;"><strong>${data.totalGolfDays}</strong> days golfed</p>
<p style="margin: 5px 0; color: #aaa;">Cost: ~$${(data.estimatedTotalCost/1000000).toFixed(1)}M</p>
<a href="https://istrumpgolfing.today" style="color: #ffa500; font-size: 0.8rem;">View Full Tracker →</a>
</div>
`;
})
.catch(console.error);
})();
</script>