robobruin / freebiestats

Automatically exported from code.google.com/p/freebiestats
0 stars 0 forks source link

See stats for other teams? #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Haven't used google code before so please forgive me if I'm not posting
this in the right place, just came from the recommendation from the
userscripts page to post feature requests here.

Could it be possible to use the script for the other teams in my league? I
remember before the latest revision, sometimes the "show freebie stats!"
button would pop up when I was looking at another team, but now, if I go to
another team page, there is just a link to the StatTracker. It would be
awesome if I could see live stats for those teams, too.

Whether this is implemented or not, thanks for giving everyone this great
script!

Original issue reported on code.google.com by and...@najbarismo.com on 26 Apr 2007 at 8:26

GoogleCodeExporter commented 9 years ago
thanks!

you should be able to view stats for other teams in your league.  I've been 
doing it
for both of the leagues I am in.

1) what is the url of the league you are in?  the script will only be activated 
for
urls of the following form that are similar to:
this regexp: /^http\:\/\/baseball\.fantasysports\.yahoo\.com\/b\d\/\d+\/\d+.*/i

Example:
http://baseball.fantasysports.yahoo.com/b2/5334/8

Original comment by robobr...@gmail.com on 30 Apr 2007 at 11:58

GoogleCodeExporter commented 9 years ago
If you reach the others teams by clicking on the team name from the league 
webpage,
then the script will work, but if you say select a team from the pull down menu 
when
you're looking at your own team, then it won't work because of the regular 
expression
that triggers the script.

when you select another team, the url looks something like this:
http://baseball.fantasysports.yahoo.com/b1/1234123/team?mid=5

should be easy to fix.

Original comment by rod...@gmail.com on 4 May 2007 at 3:26

GoogleCodeExporter commented 9 years ago
if you want to fix this yourself, a quick hack is to replace the first line of 
the
function with:

if
(!location.href.match(/^http\:\/\/baseball\.fantasysports\.yahoo\.com\/b\d\/\d+\
/\d+.*/i)
&&
!location.href.match(/^http\:\/\/baseball\.fantasysports\.yahoo\.com\/b\d\/\d+\/
team\?mid=\d+.*/))
{

Original comment by rod...@gmail.com on 4 May 2007 at 4:00

GoogleCodeExporter commented 9 years ago
rodric checked in a fix for this and I verified that it works

Original comment by robobr...@gmail.com on 4 May 2007 at 6:10