3 Fat Chicks on a Diet Weight Loss Community

3 Fat Chicks on a Diet Weight Loss Community (https://www.3fatchicks.com/forum/)
-   Weight Watchers (https://www.3fatchicks.com/forum/weight-watchers-18/)
-   -   Here's how to make WW Points show up in My Fitness Pal - count points for free! :) (https://www.3fatchicks.com/forum/weight-watchers/296500-heres-how-make-ww-points-show-up-my-fitness-pal-count-points-free.html)

Aldergrove BC 06-04-2014 02:31 PM

Oh ya, I see that now. That was copied and pasted from somewhere else.
I will go and edit it so people know :)

Koshka 06-04-2014 03:19 PM

BTW, my DH uses Chrome and we went and found the Chrome instructions on MFP and he uses tampermonkey as the add on and he did the following to make it work in Chrome (in addition to the other stuff mentioned):

add this to the top of the script file:
(function () {

and then this to the very bottom of the script:
})();

Aldergrove BC 06-04-2014 06:05 PM

Oh thank you! I prefer Chrome :)

Snoofie 06-05-2014 08:26 AM

Oh thank god. I really don't like using Firefox (I've gotten used to using Chrome.) :)

Michelle125 06-05-2014 10:01 PM

are there detailed instructions for doing this in chrome with tampermonkey?

Koshka 06-06-2014 01:54 AM

I used the ones I posted and that was enough. There are some threads on MFP though so maybe some have more.

But really all you have to do is install Tampermonkey then edit the script as I posted. Also change lines 10 and 11 of the original script to true.

Aldergrove BC 06-06-2014 01:30 PM

When I go to that same userscript I posted now, it takes me to a page that says Web application could not be started -
http://userscripts.org:8080/scripts/show/122949

I posted in MFP asking if someone who's better with computers than I knew what was going on with the user script but no answers yet. Weird, since it worked just fine the other day.

Michelle125 06-06-2014 01:44 PM

@Aldergrove- that's the same problem I was having! Thanks for posting to MFP :)

Michelle125 06-08-2014 02:47 PM

got it to work, here's the whole thing which WAS NOT coming up for me before. Someone had to post this in the MFP forum.

(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/*
// ==/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();
})();

stratcat45 06-24-2014 12:10 PM

I use this at My Fitness Pal as well, to give my fruits 0 pts. I just add my own and give 0 amounts to everything. I use a phone app called WWdiary for my android. It's free and I really like it - you do need to know the program though. If you pay $1.00 month thru paypal; you can use the scanner portion with it and I really like that!

Hooper 01-27-2015 02:34 PM

Does this still work? I am unable to make it work. Thanks

Koshka 01-29-2015 12:08 AM

Works fine for me. What browser are you using? (I'm using Firefox).

Kalisa 04-06-2018 11:50 PM

Hello! After searching around for quite awhile, I got this to work on my HP laptop on Firefox. I have my columns set in this order: Carbs, Sat Fat, Fiber, Protein. I used this code:
Code:

// ==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/*
// ==/UserScript==


var pointsPlus=true;
var precisonWW=0;

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">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();

The count doesn't exactly match what I tally up in WW, but it is close. For example, it still counts WW Freestyle "Free" items like a boiled egg and fruit, but that is easy to just mentally delete from the final WW Smart Points count. It does count half-Points, which I like. It also under-counted the Trader Joe's Dark Chocolate Peanut Butter Cups I indulged in, which is also fine with me, since I find that WW incriminates us for unwise food items, which can be discouraging.

Please let me know if this helps! :)

just_keep_swimming 07-07-2018 09:26 AM

There's an Android app that you can use to follow WW without a subscription. It's called Ultimate Food Value Diary and it's very cheap. It has the new plan too!

Kalisa 07-07-2018 10:43 AM

Good tip!
 
Quote:

Originally Posted by just_keep_swimming (Post 5363634)
There's an Android app that you can use to follow WW without a subscription. It's called Ultimate Food Value Diary and it's very cheap. It has the new plan too!

Thank you for this info! :)


All times are GMT -4. The time now is 04:52 AM.


Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.