Yahoo Fantasy Football Add Avg per Game

By bbates Last update Oct 28, 2010 — Installed 1,398 times.

Script Summary: Add avg points per game to My Team and Players pages



Thumb Thumb Thumb

This script adds a column for Average Fantasy Points per game to the Player tables on any pages which show Total Fantasy Points, including My Team for this season and previous seasons as well as the Players page for full season stats.

Change log:

10/27 - Fixed the "Randy Moss" bug. If a player is trader mid season, it was only getting the games for one of the teams. It should add the number of games for both (all?) teams in a season now. Also, added versioning so if you install a new version it will delete your old stats and reload the number of games played.

10/12 - Small change as I realized that reloading every time you access it on Sunday or Monday is major overkill. Instead the script will reload values the first time you see a player on Monday to capture Sundays games, and the first time you access a player Tuesday to account for Mondays game. There might be a little bit of overlap, for example if you check on Tuesday before the Monday game is over, but for the most part this should be sufficient.

10/10 - The script now saves the value of weeks played. If it is Sunday or Monday it will always load the stats. I was not sure how else to do it, but with games running all day Sunday and Monday, I figured this was safest. Otherwise, if the weeks played is already loaded it will use that. If it is the next week, starting on Tue, it will reload the weeks played. Script runs much faster, and more efficient.

10/8 - Based on a great suggestion from user Mandrew I changed the script to find the actual number of games played instead of the lazy way previously used. This should get the actual number of games played for each player on the page for whatever year is selected.

10/6 - fix to make it work on the player search page. Remove the ad on the right hand side that covers the new column on some pages.