Yahoo FFB Game Log League Points Column

By peteb Last update Oct 18, 2010 — Installed 567 times.

Need this tweak for script to work in 2011

in
Subscribe to Need this tweak for script to work in 2011 2 posts, 1 voice



bszen27 Scriptwright
FirefoxWindows

Yahoo added a couple of blank tables between the date choices and the actual gamelog tables. Therefore, somewhere around line 130-135 of the code, you will see this:

table = tables[tableNumber+1];

You simply have to change the 1 to a 3. So:

table = tables[tableNumber+3];

Everything should work fine again after that. Enjoy!

 
bszen27 Scriptwright
FirefoxWindows

My league takes away points for incompletions and I needed to edit the script in order to make it add the points correctly. I changed the current code to the following (around line 580) in order to fix it if anyone is interested.

function calcQBPoints(table, settingValues) {
var weekTotal;
var grandTotal = 0;
var cell;
var stat;
var completions; //new code

for(var j=2;j<19>
weekTotal = 0;
for(var i=5;i<25>
cell = table.rows[j].cells[i];
stat = parseFloat(cell.innerHTML);
completions = table.rows[j].cells[5].innerHTML; //new code

switch(i) {
case 5: // Completions
if(settingValues[2].length > 0 && stat > 0)
weekTotal = parseFloat(weekTotal) + (stat * parseFloat(settingValues[2]));
break;
case 6: // Passing Attempts
if(settingValues[5].length > 0 && stat > 0 && completions >0) //new code
weekTotal = parseFloat(weekTotal) + ((stat-parseFloat(completions)) * (parseFloat(settingValues[5]))); //new code
break;