Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I'm new to fitbit web app, I am loving it so far, but because I am coming from WW's I'd like to see those points as well while I transition to calorie counting instead.

Maybe there is a greasemonkey script, or setting to add custom fields?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I have created a solution for myself via Chrome Extension. Chrome Extension

This is my first chrome extension, and this is not intended to publicize said extension. I may create Firefox and Safari versions at a later date, but as this is currently for my personal use and I use Chrome here it is.

I will also include the code here for anyone interested in modifying or adding to it.

$(document).ready(function() {
var dailyTotal = 0;
//Update header name
$("#loggedFoodArea .subheader .cols7").html('PS');
//Loop through the listings and calculate points
$('#loggedFoodArea .listing ul li').each(function(index) {
    var cals = $(this).children('.cols3').html();
    var fat = $(this).children('.cols4').html();
    var fiber = $(this).children('.cols5').html();
    var ps = ((cals/50)+(fat/12)-(fiber/4)).toFixed(1);
    dailyTotal += parseFloat(ps);
    $(this).children('.cols7').html(ps);
});
$('#dailyTotals .content .total').last().after('<div class="total" style="margin-left: 12px;"><div class="label"><div class="substance">Points</div><div class="amount"><span id="pointAmount">'+(parseFloat(dailyTotal)/2).toFixed(1)+'</span></div></div></div>');

});

share|improve this answer
    
If anyone objects, and feels I did this in interest of self promotion, please speak up and I will delete the entire post. –  drye Jul 17 '10 at 4:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.