![]() |
Oh ya, I see that now. That was copied and pasted from somewhere else.
I will go and edit it so people know :) |
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: })(); |
Oh thank you! I prefer Chrome :)
|
Oh thank god. I really don't like using Firefox (I've gotten used to using Chrome.) :)
|
are there detailed instructions for doing this in chrome with tampermonkey?
|
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. |
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. |
@Aldergrove- that's the same problem I was having! Thanks for posting to MFP :)
|
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(); })(); |
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!
|
Does this still work? I am unable to make it work. Thanks
|
Works fine for me. What browser are you using? (I'm using Firefox).
|
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==Please let me know if this helps! :) |
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!
|
Good tip!
Quote:
|
| 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.