Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Yahoo Fantasy Baseball Player Notes

Displays a tooltip containing the notes for a player when mouse is over note icon/image.

Updates:
22-May-2007 - Added dropshadow image, working image
23-May-2007 - Was only showing the latest news, changed to show all news items
23-May-2007 - Changed delay from 500ms to 100ms
25-May-2007 - Got rid of 'jumping' weirdness in some cases, but had to lose dropshadow
25-May-2007 - Bail quietly on any exceptions during initialization
23-Aug-2007 - Tweak to make it work with both baseball and football (and maybe some other sports)
17-Jul-2008 - Fixed to work with Firefox 3

Screenshots...

Works for football now too...

- Most of the credit for this script goes to Ryan Grove and his excellent Jyte ClaimInfo script:
http://userscripts.org/scripts/show/9216






Aug 9, 2008
aaron1325714 User

hey glenn i know my question has nothing to do with this script but i couldnt find your email anywhere

so i was wondering if you could create this script except for baseball it is a bench all players without a game script

http://userscripts.org/scripts/show/6716

that is the script link

and here is the actual script

// ==UserScript==
// @name Yahoo Fantasy NBA Bench All
// @namespace http://mattandchristy.net/benchall
// @description Provides a button to bench all players without a game
// @include http://basketball.fantasysports.yahoo.com/nba/*...=*
// @include http://basketball.fantasysports.yahoo.com/nba/*...
// ==/UserScript==
//
// Change log:
// 2006-12-10 Initial version of script; used Yahoo Fantasy NBA Game Log Link
// as a base to start developing

var doBench = function(event) {

var allElements;
var thisElement;
var playerLink = "http://sports.yahoo.com/nba/players/"
var gameLogLink;


allElements = document.evaluate(
"//*[contains(@class, 'player')]/..",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);

// burn the first two rows; they are headers, not players
for (var i = 2; i < allElements.snapshotLength; i++) {

thisElement = allElements.snapshotItem(i);

tds = thisElement.getElementsByTagName('td');
nameNode = tds[1];
if(nameNode) {
// td div a textnode value
name = nameNode.firstChild.firstChild.firstChild.nodeValue;

// get the opponent TD's innerHTML; text node won't work because
// the ? for 'no opponent' gets translated to a character =/
opp = tds[3].innerHTML;

if(opp == '?') {

newPosSelectNode = tds[2].firstChild;
// select the 'BN' node for these guys (last option)
newPosSelectNode.selectedIndex = newPosSelectNode.length-1;

GM_log("Benching " + name);
}
}
}

// stop event propagation, if this was a click
if(event) {
event.stopPropagation();
event.preventDefault();
}
}

/* gameLogLink = document.createElement('a'); */
/* gameLogLink.setAttribute("href",thisElement.href + "/gamelog") */
/* //gameLogLink.setAttribute("class","cellindent") */
/* gameLogLink.setAttribute("target","_blank") */
/* gameLogLink.setAttribute("title","game log link") */
/* gameLogLink.innerHTML = "" */
/* thisElement.parentNode.insertBefore(gameLogLink, thisElement.nextSibling.nextSibling); */

var BENCHBUTTON_ID = "bencherButton";
var BENCHBUTTON_TEXT = "[Bench players with no game]";

// create the bench button
var bencher = document.createElement("A");
bencher.addEventListener("click", doBench, true);
bencher.href = "#";
bencher.innerHTML = BENCHBUTTON_TEXT;
bencher.className = 'button';
/* bencher.style.backgroundColor = "#D8D9D5"; */
/* bencher.style.borderTopColor = "#A8A8A8"; */
/* bencher.style.borderBottomColor = "#A8A8A8"; */
/* bencher.style.borderLeftColor = "#A8A8A8"; */
/* bencher.style.borderRightColor = "#A8A8A8"; */
/* bencher.style.borderTopStyle = "outset"; */
/* bencher.style.borderBottomStyle = "outset"; */
/* bencher.style.borderLeftStyle = "outset"; */
/* bencher.style.borderRightStyle = "outset"; */
/* bencher.style.borderTopWidth = "1px"; */
/* bencher.style.borderBottomWidth = "1px"; */
/* bencher.style.borderLeftWidth = "1px"; */
/* bencher.style.borderRightWidth = "1px"; */
bencher.style.paddingTop = "2px";
bencher.style.paddingBottom = "5px";
bencher.style.paddingLeft = "5px";
bencher.style.paddingRight = "5px";
bencher.style.color = "#FFFFFF";
bencher.id = BENCHBUTTON_ID;

// attach the bench button right before the "submit changes" button
// at the bottom of the screen
var buttonBar = document.getElementById('buttonbar');
var inputs = buttonBar.getElementsByTagName('input');
var submitButton = inputs[inputs.length-1]
buttonBar.insertBefore(bencher, submitButton);

i tried to mess around with it a little bit but got no luck

please respond soon

i will post this on a couple other pages to ensure that you get the message

Aaron S

 
Jun 29, 2008
searchforsun... User

thanks for the update :)

 
Jun 25, 2008
Gamelist User

Doesn't work on Firefox 3, as well as Gamelog Tip.

So I wonder if an upgrade is coming soon.

 
Jun 11, 2008
Tim Wilson Scriptwright

Yahoo has opened up Fantasy Football for the 2008 season. They have changed the interface some, and certain scripts cause the new interface to behave incorrectly. For example, if you hover over the "My Team" link, a sub-menu will open up, allowing you to directly go to a particular page instead of having to click on "My Team" then clicking on the link for the page you want. However, with some scripts enabled for football, the sub-menu disappears, making it so you cannot click on an entry in the sub-menu. This script is one of those scripts. I have found the following scripts also break the new interface:
Yahoo Fantasy Game Log Tooltip
Yahoo Fantasy Smack Tooltip

 
Apr 14, 2008
higherpie Scriptwright

This script (and a couple of your others) no longer work on Firefox 3 (Beta 5).

Possible to update them? Thanks for your awesome work!

 
Oct 4, 2007
Lodega User

I love this so much for baseball, thanks for making it work. I've been sucked into a hockey league and would love to be able to use it there too. I wonder why it's not as simple as adding the Yahoo hockey link, but that's obviously not enough.

Anyway, if there's a way to do this, I'd love to.

Thanks again!

 
Aug 30, 2007
Tim Harding Scriptwright

Glenn, nice to see it works with football too. I have a suggestion though. It's annoying that the notes don't appear on the 'Tools' page in either baseball or football. Any way the notes image could be added so we could see why players were being added/dropped? I know this is beyond the scope of your script, but it would be a great addition.

 
Aug 29, 2007
kap User

Hey, awesome. Much thanks. :)

 
Aug 23, 2007
Glenn Carr Script's author

The latest update should work for football as well as baseball.

 
Aug 22, 2007
Glenn Carr Script's author

I'll take a look at fixing it up to work for both, shouldn't be took difficult.

 
Aug 22, 2007
kap User

This script is the single most useful greasemonkey script I have ever used. I feel completely, utterly naked without this feature in yahoo's fantasy football, I don't know how I ever survived without for baseball. I don't suppose anyone wants to do some hard work and make this work there? :)

 
May 25, 2007
JakeS User

Yeah, I suppose I don't really need the feature. I just thought that it was very handy for Yahoo and that it would be cool to have on ESPN as well.

Something that ESPN is really lacking is a FA watch list. That is a feature that I have been desperately wanting ever since I started using ESPN.
But that would probably take a lot of work.

 
May 25, 2007
Glenn Carr Script's author

So, ESPN already has very nice popups for player info, much better than Yahoo's. Only difference is that you have to click the icon, instead of just hovering over it.

 
May 25, 2007
JakeS User

Here's a link to my team page: http://games.espn.go.com/flb/clubhouse?leagueId...

And here's a link to the league homepage:
http://games.espn.go.com/flb/leagueoffice?leagu...

 
May 24, 2007
Glenn Carr Script's author

There is a way I'm sure, not sure about the easy part. What's a link to an ESPN league I can look at?

 
May 24, 2007
JakeS User

Is there an easy way to make this work with ESPN as well?

 
May 22, 2007
Glenn Carr Script's author

Well... I wouldn't exactly call them 'art', ;) but thanks for the kudos.

 
May 22, 2007
JakeS User

Glen Carr, your Fantasy Baseball scripts are a work of art. This one is no exception - I love it. Keep up the good work.

You could comment on this script if you were logged in.