Donald's Bacon Bytes

bytes of information as tasty as bacon

MyFitnessPal – Macro Percentages Script

Topic: Cooking, Development, Fitness | Tags:

Apr
02
2012

A few months ago I started tracking my calories and exercise on a website called MyFitnessPal (dhansen999). It is a great tool in the weight loss journey and has helped me a lot as I work towards my weight loss goals. There was something missing from this though. It is great for tracking calories and setting up calorie goals as well as macro nutrient goals. On the diary page for the day, it will list your calorie goals and nutrient goals. But in the real world, you don’t always eat the exact amount of calories. So, if I was 150 calories above or below my goal, I wasn’t totally sure how much carbs/fat/protein that I should eat because it shows me the number based on the calorie goal, not based on how much I have consumed.

To solve this, I wrote a user script for Google Chrome. What this script does is that it will inject values into the page that show me the percentages I have consumed. Sure, I could do some math and figure it out but why do that when I can write a script to do it for me?

Anyway, figured I would share this for anyone else that wanted to install it and use it. To install, you need to first make sure you are using Google Chrome for your web browser. If you are, head on over to their web store to download the extension. After it is installed, head over to myfitnesspal.com and check out your dairy.

Here is an example of what your page will look like after installing the script:

MyFitnessPal Percentages

The script is setup to use the above column positions and that is what it will default to every time you open the page. The number in parenthesis represents that percentage based on the total calories for that day or that meal.

Comments are closed.