How to Track Weight Watchers Points on MFP!!
Replies
-
I'm stuck with this add-on, too. I used to use this on my windows laptop with firefox no problem. Now I have a Macbook and I'm using Chrome and I can't even get the points column to show up. I've closed the browser, cleared the cache, rebooted... nothing is working. On my Tampermonkey, it won't even show that a script is running. I click "enable" but then it constantly shows that nothing is running. Didn't have this much trouble before. Ideas, anyone?
0 -
I'm stuck with this add-on, too. I used to use this on my windows laptop with firefox no problem. Now I have a Macbook and I'm using Chrome and I can't even get the points column to show up. I've closed the browser, cleared the cache, rebooted... nothing is working. On my Tampermonkey, it won't even show that a script is running. I click "enable" but then it constantly shows that nothing is running. Didn't have this much trouble before. Ideas, anyone?
OK, I tried again and now the script will run, and I see a points column but no points will populate. Both lines are set to "false"... I've tried switching those. I don't want to fiddle with the code too much as I don't want to mess it all up. Any suggestions are appreciated.0 -
When I joined MFP I tracked both points AND calories. It was time consuming and I didn't think I'd like tracking calories, it seemed like soooo much more work!
BUT! I much prefer tracking calories because of the feedback on nutrition I'm getting and I no longer want to be tethered to weight watchers. I don't like the recent plan at all, I had the 'old' points memorized and then they went and changed it.
Either way, tracking works, it keeps me accountable and I'm more likely to succeed when I track. There are many options out there, use the one you like most :-) Just a few decades ago, we didn't have all these wonderful options, gotta' love technology!!!!!
I too liked the old WW points plan, I lost 98 lbs using it. I left WW and tried going back but the new plan didn't work for me. I am going to pull out my old WW guide and start using it. It's gotta be better than doing nothing at all. Tracking is the key, regardless of the plan we choose.0 -
I cannot get this script to work. Do I paste the code starting at the top of tampermonkey or where it says Add your script here... I dont even see the points column.
0 -
Do you use the same script for the new WW smart points plan?0
-
I would think that you could just change the calculations to reflect the new "smart point" values in the script and it would calculate the smart points. I tried but it didn't give me the right points. However, I know nothing about writing scripts.0
-
Took me hours but I made it work (Mac OsX on Chrome and FF) I had to change the lines 5 and 6 to
// @include http://www.myfitnesspal.com/food/diary*
// @include https://www.myfitnesspal.com/food/diary*
since in the original script it said
// @include http://www.myfitnesspal.com/food/diary/*
// @include https://www.myfitnesspal.com/food/diary/*
and the address does not include the /
Hope it helps some of you guys
PS: Thank you, thank you, thank you for the script
PPS: I also added another "meal" for all my fruits and veggies since its counting the points for that as well. Now I can substract these points "easier" of the total value and have my real points0 -
I would think that you could just change the calculations to reflect the new "smart point" values in the script and it would calculate the smart points. I tried but it didn't give me the right points. However, I know nothing about writing scripts.
It should work though- I decided to go back to the FlexPoints since I had great success with that system. And I kinda prefer it since I can just calculate the Points in my head when I'm grocery shopping. I just changed the settings in the script and it works just perfectly.0 -
I'll have to see if my son can figure it out. Thanks0
-
Used this script in the past and it worked great, but no longer seems to work on my Windows 10 Chrome system. Tamper Monkey says the script is still in stalled. Any ideas?0
-
I would love to know how to use with SmartPoints!0
-
If you rejoin WW and do the Smart Points you also need the sugar grams to calculate the points.Anything with sugar or dairy has gone up in points.They are now urging more lean protein,fruits and veggies.0
-
No matter what I do, I can't get points to show up in MFP. I'm new to WW and have used MFP for a while. I installed tamper monkey, used the script you provided and tried changing the lines above. I enabled it and ran it, but nothing happened. What am I doing wrong?0
-
Can anyone give me the script for the new WW Smart points?0
-
If there is no script for the WW Smart points, can someone post the script for the old one. I set it up based on older posts and it isn't working.
0 -
// @include http://www.myfitnesspal.com/food/diary*
// @include https://www.myfitnesspal.com/food/diary*
and the address does not include the /
Thank you msk3001!
As you suggested, removing the forward slash / at the end of "diary" in the above 2 lines fixed the issue for me.
0 -
If anyone feels inclined to update the script with Smart Points, this blogger has done a LOT of the work on the new calculations.
http://weightwatchergeek.blogspot.com.au/2015/12/a-comparison-of-weight-watchers-points.html
All credit to Thomas Mills Hinkle
https://plus.google.com/+ThomasMillsHinkle/posts
From the website.
*****************
0.24*Sugar + 0.55*Saturated Fat + 0.27 * (Fat-Sat Fat) + 0.12 * (Carb - Sugar) + 0.024 * Protein + Alcohol * 0.18
The following formula is, in my tests, slightly less accurate but perfectly serviceable:
(0.0305 * calories) - (0.098*protein) + (0.12*sugar)+(0.275*sat fat)
*******************
MFP limits the number of nutrients being tracked on the website to 5 plus calories, so using the more complex and accurate calculation of 6 nutrients, as above, may not be helpful with the script.
There is the simpler calculation but not as accurate.0 -
Looking for an updated script with SmartPoints please.0
-
gidget2208 wrote: »
Thank you msk3001!
As you suggested, removing the forward slash / at the end of "diary" in the above 2 lines fixed the issue for me.
Yeah- I'm glad it worked for you0 -
Bump0
-
hi, where are you seeing the points? I have added the script, with the mentioned adjustments in Tampermonkey and still do not see point on my fitness pal account.....
can I add my scripting code in this text box, and can someone confirm that it is correct...not a programmer, just really want points to show...0 -
Hi,
here is an updated version of the WW_MFP script - I just made some additions on "user friendly configuration" and the additional SP formula.
All credits go to the original creators of this script
Just go to GitHub with this link:
github.com/LeChuck71/MFP_WW_Points- Click on the "MFP_WW_Points.user.js" file to show the script
- On top of the script there should be a "RAW" button - click on it
- Now Tmpermonkey should recognise a "userscript" and asks you to install it
Thats it!
In line 11 you can change the point calculation
var usePointCalculation ="SmartPoints";
Change to true to: original, PointsPlus, SmartPoints
to change calculation formula
Some comments on the usage:- For me it only works if I set my MFP language to "English" (I am original from Germany)
- Also it just shows the points if your browser shows "http://www.myfitnesspal.com/food/diary/username" with username your name on MFP
- If I click "Food Diary" the username ist missing sometimes, blame MFP for that, without the username it does not calculate the points.
I am no expert in scripting or point calculation. I you discover any mistake please report it here or better on GitHub
Cheers
P.S.
Tested on Google Chrome, Firefox with the additional Tapermonkey/Greasemonkey
0 -
Thanks so much for your help. I followed your steps, precisely and it still does not show...I am giving up..might have to purchase the WW etools after all...0
-
OMG!!!! Thankyou thankyou thankyou...the problem I was having was Tampermonkey was not enabled! I have Smart points!!!! for all those looking to get this follow zapod 71 instructions (page20) 1/27/2016
Thanks again, !
BTW, I did put my MFP username in address0 -
Hey glad it works for you
If you can check the points calculation and give me some feedback would be great.
I did it on some foods and recipes and it was fine compared to the original WW tool on an ipad.
Cheers
0 -
Zahpod71,
Using Greasemonkey (Pale Moon / Firefox). I tried in Firefox since I didn't want to lose what I had in Pale Moon so far. Haven't been able to get this to work. I know for the older PP calculation you had to list tracking items in the setting as "Carbs, Fat, Fiber and Protein" for the calculation to work. I tried subbing in Sat Fat & Sugar and taking out the Carbs and Fat, but not working.. Also, do I need to change anything in the script to have it show SP's?
Not very technical, so I'm sure I've put something in wrong.. Could use your help.
Thanks,
Joanna0 -
Hi Joanna,
I think for SP its Satureated Fat and sugar - but nur sure about it. If one is missing the calculation is not correct but should show up as a additional column.
Make sure your browser end with your MFP "username" as mentioned in my post
"http://www.myfitnesspal.com/food/diary/username" with username your name on MFP
If thats not in it it will not show up in my browser as well.
Try it and please report
Cheers
Axel0 -
Hi Axel,
Loaded the new script, set the options for SP, (Calories, Saturated Fat, Sugar, Protein) and nothing.. not even seeing the Points column anymore. And yes, I did make sure my username was included in the URL. Under PP, the options were (Carbs, Fat, Fiber, Protein) and it showed the Points column.
I have to be doing something wrong, but I don't know what.. Do I have to change anything in the script?0 -
I tried the script posted on Github above, but many of the values (for non-fruit and vegetable foods) didn't match up with the current Weight Watchers website. I you want to use that one, you have to have sugar as your last nutrient dropdown.
I tweaked the original script so that I could have another nutrient column of anything I wanted. (FYI I'm not a programmer, but I had fun fiddling around with it.) This worked on Chrome. The script is hard coded so that the different nutrients have to be in a specific order and the WW points come at the end after protein. BUT you can easily add one additional column between calories and carbs if you change the column numbers. This is still the older version of Weight Watchers points, so your fruits and veggies won't show up as 0 points. (I'm planning on just subtracting them in my head for now, but I'll ask my programmer husband if he can figure out a way to rewrite the script to make it actually work.) I also added the code that someone else mentioned to make it so that it works when you click on the diary button or switch to different days.
Here are the steps to make it work:
1) I went to the diary settings and changed the drop downs to the following order: Sugar (you can sub for whatever nutrient you want to track), Carbs, Fat, Fiber, Protein.
2) Installed Tampermonkey, clicked on the new Tampermonkey symbol on my browser bar and went to Add New Script
3) Erase everything in the box and paste in the code below and hit the save button. Refresh your diary and hopefully it should work for you.
(function () {
// ==UserScript==
// @name MyFitnessPal Weight Watchers Points
// @version 1.1.4
// @description Adds display of Weightwatcher points to any daily food diary page. Also adds "Real Calories" calcalation based off 4/4/9 algorithm.
// @include http://www.myfitnesspal.com/food/diary/*
// @include https://www.myfitnesspal.com/food/diary/*
// @include http://www.myfitnesspal.com/food/diary?*
// @include http://www.myfitnesspal.com/food/diary
// ==/UserScript==
var pointsPlus=true;
var precisonWW=true;
if (window.top !== window.self) {
return; /* do not run in frames */
}
if (typeof unsafeWindow != 'undefined')
{
(function page_scope_runner() {
// If we're _not_ already running in the page, grab the full source
// of this script.
var my_src = "(" + page_scope_runner.caller.toString() + ")();";
// Create a script node holding this script, plus a marker that lets us
// know we are running in the page scope (not the Greasemonkey sandbox).
// Note that we are intentionally *not* scope-wrapping here.
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = my_src;
document.body.appendChild(script);
})();
return;
}
function startRun() {
var script = document.createElement("script");
script.setAttribute("src", "http://www.google.com/jsapi");
script.addEventListener('load', function() {
loadscripts_1();
}, false);
document.body.appendChild(script);
}
var points, totalPoints=0;
function getPointOld(cal1, fat1, fiber1, carbs, protein)
{
points=0;
if (fiber1>4 && !pointsPlus)
fiber1=4;
points = cal1/50;
points += fat1/12;
points -= fiber1/5;
if (pointsPlus)
points = (protein / 10.94) + (carbs / 9.17) + (fat1/3.89)- (fiber1 / 12.49);
//alert(points);
if (precisonWW)
{
points=Math.round(points)
}
else
{
var intPoints = Math.floor(points);
fraction = points - intPoints;
if (fraction<0.25)
points = intPoints + 0.0;
else if (fraction>=0.25 && fraction<0.75)
points = intPoints +0.5;
else
points = intPoints+1;
}
}
function main()
{
//$("tr:first").append('<col class="col-2" />');
$("tr:first").append('<th >');
$("tr:not(:first)").append("<td>");
var found=false;
var totalFound=false;
var table1 = jQuery('.table0');
var totalPoints=0;
//alert($(table1[12]).text());
var rowInd=-1;
table1.find('tr').each(function()
{
rowInd++;
var index=0;
found=false;
if ($(this).hasClass('meal_header') && rowInd==0)
$(this).append('<td class="alt">Weight Watcher Points+</td>');
if (!totalFound && $(this).hasClass('total'))
{
totalFound=true;
$(this).find('td').eq(7).html(totalPoints);
}
var cols=$(this).find('td').each(function()
{
if (index==0)
;
else if (index==1)
{
cal11=($(this).text());
}
else if (index==2)
carbs=($(this).text());
else if (index==3)
fat11=$(this).text();
else if (index==4)
fiber11=$(this).text();
else if (index==5)
protein=($(this).text());
else if (index==6 && $(this).hasClass('delete'))
{
found=true;
getPointOld(cal11, fat11, fiber11, carbs, protein);
totalPoints+=points;
//$(this).append(points);
}
else
{
if (found)
$(this).append(points);
/*if (totalFound)
{
totalFound=false;
$(this).append('<td/><td/><td/>'+totalPoints);
}*/
}
index +=1;
}
);
});
}
function loadscripts_1()
{
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js");
script.addEventListener('load', function() {
loadscripts_2();
}, false);
document.body.appendChild(script);
}
function loadscripts_2()
{
jQuery.noConflict();
/* fix for old prototype conflict with google viz api */
/* retrieves the Array reduce native function using cleverness */
var ifr = document.createElement('iframe');
document.body.appendChild(ifr);
Array.prototype.reduce = ifr.contentWindow.Array.prototype.reduce;
document.body.removeChild(ifr);
google.load( "visualization", "1", {packages:["corechart"],"callback":main} );
}
startRun();
})();
0 -
Sorry, I posted the old version and it won't let me edit or delete the post. Here is the correct version: (function () {
// ==UserScript==
// @name MyFitnessPal Weight Watchers Points
// @version 1.1.4
// @description Adds display of Weightwatcher points to any daily food diary page. Also adds "Real Calories" calcalation based off 4/4/9 algorithm.
// @include http://www.myfitnesspal.com/food/diary/*
// @include https://www.myfitnesspal.com/food/diary/*
// @include http://www.myfitnesspal.com/food/diary?*
// @include http://www.myfitnesspal.com/food/diary
// ==/UserScript==
var pointsPlus=true;
var precisonWW=true;
if (window.top !== window.self) {
return; /* do not run in frames */
}
if (typeof unsafeWindow != 'undefined')
{
(function page_scope_runner() {
// If we're _not_ already running in the page, grab the full source
// of this script.
var my_src = "(" + page_scope_runner.caller.toString() + ")();";
// Create a script node holding this script, plus a marker that lets us
// know we are running in the page scope (not the Greasemonkey sandbox).
// Note that we are intentionally *not* scope-wrapping here.
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = my_src;
document.body.appendChild(script);
})();
return;
}
function startRun() {
var script = document.createElement("script");
script.setAttribute("src", "http://www.google.com/jsapi");
script.addEventListener('load', function() {
loadscripts_1();
}, false);
document.body.appendChild(script);
}
var points, totalPoints=0;
function getPointOld(cal1, fat1, fiber1, carbs, protein)
{
points=0;
if (fiber1>4 && !pointsPlus)
fiber1=4;
points = cal1/50;
points += fat1/12;
points -= fiber1/5;
if (pointsPlus)
points = (protein / 10.94) + (carbs / 9.17) + (fat1/3.89)- (fiber1 / 12.49);
//alert(points);
if (precisonWW)
{
points=Math.round(points)
}
else
{
var intPoints = Math.floor(points);
fraction = points - intPoints;
if (fraction<0.25)
points = intPoints + 0.0;
else if (fraction>=0.25 && fraction<0.75)
points = intPoints +0.5;
else
points = intPoints+1;
}
}
function main()
{
//$("tr:first").append('<col class="col-2" />');
$("tr:first").append('<th >');
$("tr:not(:first)").append("<td>");
var found=false;
var totalFound=false;
var table1 = jQuery('.table0');
var totalPoints=0;
//alert($(table1[12]).text());
var rowInd=-1;
table1.find('tr').each(function()
{
rowInd++;
var index=0;
found=false;
if ($(this).hasClass('meal_header') && rowInd==0)
$(this).append('<td class="alt">Weight Watcher Points+</td>');
if (!totalFound && $(this).hasClass('total'))
{
totalFound=true;
$(this).find('td').eq(8).html(totalPoints);
}
var cols=$(this).find('td').each(function()
{
if (index==0)
;
else if (index==2)
{
cal11=($(this).text());
}
else if (index==3)
carbs=($(this).text());
else if (index==4)
fat11=$(this).text();
else if (index==5)
fiber11=$(this).text();
else if (index==6)
protein=($(this).text());
else if (index==7 && $(this).hasClass('delete'))
{
found=true;
getPointOld(cal11, fat11, fiber11, carbs, protein);
totalPoints+=points;
//$(this).append(points);
}
else
{
if (found)
$(this).append(points);
/*if (totalFound)
{
totalFound=false;
$(this).append('<td/><td/><td/>'+totalPoints);
}*/
}
index +=1;
}
);
});
}
function loadscripts_1()
{
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js");
script.addEventListener('load', function() {
loadscripts_2();
}, false);
document.body.appendChild(script);
}
function loadscripts_2()
{
jQuery.noConflict();
/* fix for old prototype conflict with google viz api */
/* retrieves the Array reduce native function using cleverness */
var ifr = document.createElement('iframe');
document.body.appendChild(ifr);
Array.prototype.reduce = ifr.contentWindow.Array.prototype.reduce;
document.body.removeChild(ifr);
google.load( "visualization", "1", {packages:["corechart"],"callback":main} );
}
startRun();
})();1
Categories
- All Categories
- 1.4M Health, Wellness and Goals
- 393.4K Introduce Yourself
- 43.8K Getting Started
- 260.2K Health and Weight Loss
- 175.9K Food and Nutrition
- 47.4K Recipes
- 232.5K Fitness and Exercise
- 427 Sleep, Mindfulness and Overall Wellness
- 6.5K Goal: Maintaining Weight
- 8.5K Goal: Gaining Weight and Body Building
- 153K Motivation and Support
- 8K Challenges
- 1.3K Debate Club
- 96.3K Chit-Chat
- 2.5K Fun and Games
- 3.7K MyFitnessPal Information
- 24 News and Announcements
- 1.1K Feature Suggestions and Ideas
- 2.6K MyFitnessPal Tech Support Questions