This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

MyFitnessPal Web Macro Trend Chart

Utilities · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryUtilities
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script scans MyFitnessPal web dashboard and nutrition summary pages for daily macro nutrient data—calories, protein, carbs, fat, fiber, sugar, and sodium—and displays a floating chart panel showing macro trends over time. It extracts numeric values from nutrition summaries, calculates daily/weekly averages, and shows a stacked bar chart of macro composition over time using sequential snapshots. The panel displays the current day's macros with color-coded status: green for on target (within ±10% for calories, ±20% for macros), yellow for under, red for over. A breakdown of macro percentages and a summary of daily averages are included. A one-click export function saves macro data as CSV or JSON. All macro snapshots are stored per domain locally for tracking nutritional trends over time.

WHERE IT RUNS

Works on MyFitnessPal web dashboard and nutrition summary pages—myfitnesspal.com/dashboard, myfitnesspal.com/food/diary, or any page displaying daily calorie and macro totals. The script scans page content for calorie and macro patterns, making it compatible with MyFitnessPal's web interface.

HOW TO USE

The panel appears automatically when you visit your MyFitnessPal dashboard. It detects the current day's macros and displays a calorie card with status color, followed by a macro grid showing protein, carbs, and fat with targets and percentages. Additional metrics like fiber, sugar, and sodium are shown below. The trend chart shows a stacked bar chart of protein, carbs, and fat over time based on saved snapshots—each visit saves a snapshot, building a history of your macro intake. Set your calorie, protein, carbs, and fat targets using the input fields—click "Set" to apply. Click "Refresh Data" to rescan for updated macros. Export macro data as CSV for spreadsheet analysis or as JSON for programmatic use. Use "Clear History" to reset stored snapshots for the current domain. The panel automatically saves a snapshot each time you visit, building a history of your nutritional intake.

TECHNICAL MECHANISM: MACRO DATA EXTRACTION WITH TARGET COMPARISON AND STACKED TREND CHART

The script uses a multi-pass detection strategy to find macro data. First, it scans the page text for calorie patterns using regex like "Calories: [number]" and "Cal: [number]." Second, it scans for macro patterns for protein, carbs, fat, fiber, sugar, and sodium using regex with units (g, mg). Third, it scans elements with nutrition-related class names (.nutrition, .macro, .nutrient, .food-summary) and extracts numeric values. The script also looks for dates to associate with each snapshot. Macro targets (calories, protein, carbs, fat) are stored per domain using GM_setValue with defaults (2000, 150, 250, 65). Status color-coding uses tolerance-based comparison: calories ±10%, macros ±20%. The trend chart is a stacked bar chart where each day's bars represent protein, carbs, and fat stacked vertically, with the total bar height proportional to the maximum calorie value. Legend colors: protein = green (#22c55e), carbs = yellow (#eab308), fat = red (#ef4444). Each bar has a tooltip with the date and nutrient values. Each snapshot stores all detected macros with a timestamp, capped at 30 entries per domain.

THE PANEL

The macro trend chart appears in a draggable, resizable panel that remembers its position per site. The panel shows the calorie card, macro grid, additional metrics, stacked bar chart, and history. Drag by the header to reposition, collapse to a compact icon with a click, and resize using the bottom-right corner. The panel snaps to screen edges for tidy placement and closes with the Escape key. All settings—macro targets and panel position—persist per website using GM_setValue, so your view returns exactly as you left it.

PLEASE NOTE

This script requires the free BotGentz extension to run. The script relies on MyFitnessPal's current web dashboard layout—if MyFitnessPal updates their page structure, macro detection may need updating. The script does not access your MyFitnessPal account credentials—all data is read from the visible page and tracked locally. The stacked bar chart shows the last 20 snapshots; visit the dashboard regularly to build a meaningful history. The macro targets are stored per domain and used for status color-coding. All data is stored locally in your browser via GM_setValue and never transmitted. The script is designed for tracking macro intake, not for modifying or uploading data to MyFitnessPal.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.