<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Discussion on Yahoo Fantasy Player Search | Userscripts.org</title>
    <link>http://userscripts.org/scripts/show/9461</link>
    <description>Recent comments on userscript: Yahoo Fantasy Player Search</description>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>Archived Comments, replied by aaron1325714 @ Sat, 09 Aug 2008 02:50:03 -0500</title>
      <description>&lt;p&gt;hey glenn i know my question has nothing to do with this script but i couldnt find your email anywhere&lt;/p&gt;

&lt;p&gt;so i was wondering if you could create this script except for baseball it is a bench all players without a game script&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://userscripts.org/scripts/show/6716&quot;&gt;http://userscripts.org/scripts/show/6716&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;that is the script link&lt;/p&gt;

&lt;p&gt;and here is the actual script&lt;/p&gt;

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

&lt;p&gt;var doBench = function(event) {&lt;/p&gt;

&lt;p&gt;  var allElements;
&lt;br /&gt;  var thisElement;
&lt;br /&gt;  var playerLink = &quot;http://sports.yahoo.com/nba/players/&quot;
&lt;br /&gt;  var gameLogLink;
&lt;br /&gt;  
&lt;br /&gt;  
&lt;br /&gt;  allElements = document.evaluate(
&lt;br /&gt;    &quot;//*[contains(@class, 'player')]/..&quot;,
&lt;br /&gt;    document,
&lt;br /&gt;    null,
&lt;br /&gt;    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
&lt;br /&gt;    null);
&lt;br /&gt;  
&lt;br /&gt;  // burn the first two rows; they are headers, not players
&lt;br /&gt;  for (var i = 2; i &amp;lt; allElements.snapshotLength; i++) {&lt;/p&gt;

&lt;p&gt;    thisElement = allElements.snapshotItem(i);&lt;/p&gt;

&lt;p&gt;    tds = thisElement.getElementsByTagName('td');
&lt;br /&gt;    nameNode = tds[1];
&lt;br /&gt;    if(nameNode) {
&lt;br /&gt;          // td       div        a          textnode   value
&lt;br /&gt;      name = nameNode.firstChild.firstChild.firstChild.nodeValue;
&lt;br /&gt;      
&lt;br /&gt;      // get the opponent TD's innerHTML; text node won't work because
&lt;br /&gt;      // the ? for 'no opponent' gets translated to a character =/
&lt;br /&gt;      opp  = tds[3].innerHTML;
&lt;br /&gt;      
&lt;br /&gt;      if(opp == '?') {
&lt;br /&gt;        
&lt;br /&gt;        newPosSelectNode = tds[2].firstChild;
&lt;br /&gt;        // select the 'BN' node for these guys (last option)
&lt;br /&gt;        newPosSelectNode.selectedIndex = newPosSelectNode.length-1;
&lt;br /&gt;        
&lt;br /&gt;        GM_log(&quot;Benching &quot; + name);
&lt;br /&gt;      }
&lt;br /&gt;    }  
&lt;br /&gt;  }
&lt;br /&gt;  
&lt;br /&gt;  // stop event propagation, if this was a click
&lt;br /&gt;  if(event) {
&lt;br /&gt;    event.stopPropagation();
&lt;br /&gt;    event.preventDefault();
&lt;br /&gt;  }
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;/* 	    gameLogLink = document.createElement('a'); */
&lt;br /&gt;/*       gameLogLink.setAttribute(&quot;href&quot;,thisElement.href + &quot;/gamelog&quot;) */
&lt;br /&gt;/*       //gameLogLink.setAttribute(&quot;class&quot;,&quot;cellindent&quot;) */
&lt;br /&gt;/*       gameLogLink.setAttribute(&quot;target&quot;,&quot;_blank&quot;) */
&lt;br /&gt;/*       gameLogLink.setAttribute(&quot;title&quot;,&quot;game log link&quot;) */
&lt;br /&gt;/*       gameLogLink.innerHTML = &quot;&lt;img src=&quot;\\&quot;&gt;&quot;  */
&lt;br /&gt;/*       thisElement.parentNode.insertBefore(gameLogLink, thisElement.nextSibling.nextSibling); */&lt;/p&gt;

&lt;p&gt;var BENCHBUTTON_ID   = &quot;bencherButton&quot;;
&lt;br /&gt;var BENCHBUTTON_TEXT = &quot;[Bench players with no game]&quot;;&lt;/p&gt;

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

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

&lt;p&gt;i tried to mess around with it a little bit but got no luck&lt;/p&gt;

&lt;p&gt;please respond soon&lt;/p&gt;

&lt;p&gt;i will post this on a couple other pages to ensure that you get the message&lt;/p&gt;

&lt;p&gt;Aaron S&lt;/p&gt;</description>
      <pubDate>Sat, 09 Aug 2008 02:50:03 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78009</guid>
      <author>aaron1325714</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Tim Wilson @ Thu, 20 Sep 2007 18:18:25 -0500</title>
      <description>&lt;p&gt;Oh, and it didn't work for NBA.  I changed the line where you are comparing for hockey to the following:
&lt;br /&gt;&lt;code&gt;
&lt;br /&gt;&lt;pre&gt;
if ( /^my team/i.test( atext ) &amp;amp;&amp;amp; (/\/([a-z]\d|hockey)\/\d+\/\d+/i.test( a.href ) || /\/([a-z]\d|nba)\/\d+\/\d+/i.test( a.href ) ) )
&lt;/pre&gt;
&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 20 Sep 2007 18:18:25 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78010</guid>
      <author>Tim Wilson</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Tim Wilson @ Wed, 19 Sep 2007 16:03:46 -0500</title>
      <description>&lt;p&gt;Ok, guess I gotta do this the hard way.  One last time:&lt;/p&gt;

&lt;p&gt;Add this line between the form and input tags:
&lt;br /&gt;&lt;pre&gt;
&amp;lt;label for=&quot;playersearchtext&quot; accesskey=&quot;s&quot;&amp;gt;&amp;nbsp;&amp;lt;/label&amp;gt;\
&lt;/pre&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 19 Sep 2007 16:03:46 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78011</guid>
      <author>Tim Wilson</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Tim Wilson @ Wed, 19 Sep 2007 16:01:58 -0500</title>
      <description>&lt;p&gt;I never can post code correctly in this system. (sure do wish there was a preview button!)&lt;/p&gt;

&lt;p&gt;Let me try this again.  Add this line between the form and input tags:
&lt;br /&gt;&lt;pre&gt;
&amp;lt;label&gt;&amp;nbsp;&amp;lt;/label&gt;\
&lt;/pre&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 19 Sep 2007 16:01:58 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78012</guid>
      <author>Tim Wilson</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Tim Wilson @ Wed, 19 Sep 2007 15:58:04 -0500</title>
      <description>&lt;p&gt;Hey Glenn, I added an accesskey to the original script, so you can hit Shift-Alt-S to go to player search.  Maybe you could add it to this script too?  Here's what you need:
&lt;br /&gt;Add this line between the form and input tags:
&lt;br /&gt;&lt;code&gt;
&lt;br /&gt;&amp;lt;label&gt;&amp;nbsp;&amp;lt;/label&gt;\
&lt;br /&gt;&lt;/code&gt;
&lt;br /&gt;And add 'id=&quot;playersearchtext&quot;' to the input box tag.&lt;/p&gt;

&lt;p&gt;You might recall I created a script (&lt;a href=&quot;http://userscripts.org/scripts/show/7938&quot;&gt;http://userscripts.org/scripts/show/7938&lt;/a&gt;) to always focus the regular player search box.  I found this annoying when I was trying to arrow down through the list, as it was arrowing down through my previous searches instead.  So I added an accesskey to that script.  Then I decided to add it to the original of this script.  Now that I've found your consolidated script, I've added it to that one too!&lt;/p&gt;</description>
      <pubDate>Wed, 19 Sep 2007 15:58:04 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78013</guid>
      <author>Tim Wilson</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Glenn Carr @ Tue, 11 Sep 2007 15:51:52 -0500</title>
      <description>&lt;p&gt;'salright.  Buy my lunch and I'll forgive the 'genius' comment. ;)&lt;/p&gt;</description>
      <pubDate>Tue, 11 Sep 2007 15:51:52 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78014</guid>
      <author>Glenn Carr</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by LooGie @ Mon, 10 Sep 2007 02:06:58 -0500</title>
      <description>&lt;p&gt;and btw, nevermind my idea of having both boxes. it was stupid anyway :) i uninstalled the other one, and went w/ yours. works perfect too!&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 02:06:58 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78015</guid>
      <author>LooGie</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by LooGie @ Mon, 10 Sep 2007 02:05:57 -0500</title>
      <description>&lt;p&gt;oh, haha, sorry, i see now that you are actually the author. didn't need any disrespect. i like you script. i thought you were someone just f'ing with me. sorry about the &quot;genius&quot; comment...&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 02:05:57 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78016</guid>
      <author>LooGie</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by LooGie @ Mon, 10 Sep 2007 02:04:20 -0500</title>
      <description>&lt;p&gt;um, no genius, it doesn't add any functionality, my beef is with having to scroll up, or down to the scroll box. That's the same reason the author made this script, because he wanted it at the top, instead of having to scroll down...well, i dont want to scroll down, or up. if i'm at the bottom, i wanna search from the bottom, if the top..you get the idea..&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 02:04:20 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78017</guid>
      <author>LooGie</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Glenn Carr @ Thu, 06 Sep 2007 14:29:48 -0500</title>
      <description>&lt;p&gt;It purposely won't add a search box, if one already exists on the page.  I'm not sure why I (or anyone) would want to use both?  Does the other one provide something that this one doesn't?&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 14:29:48 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78018</guid>
      <author>Glenn Carr</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by LooGie @ Thu, 06 Sep 2007 12:58:43 -0500</title>
      <description>&lt;p&gt;Yah, works good, but it doesn't work with the other search player script. You should really add that script to your script, so both search boxes are there. Or at least make them work together...&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 12:58:43 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78019</guid>
      <author>LooGie</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Glenn Carr @ Tue, 29 May 2007 11:23:30 -0500</title>
      <description>&lt;p&gt;previous post: was == wasn't&lt;/p&gt;</description>
      <pubDate>Tue, 29 May 2007 11:23:30 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78020</guid>
      <author>Glenn Carr</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Glenn Carr @ Tue, 29 May 2007 11:23:12 -0500</title>
      <description>&lt;p&gt;Cool.  Actually, it was meant to be centered, it just shows up after the last link in the sub navigation area.&lt;/p&gt;</description>
      <pubDate>Tue, 29 May 2007 11:23:12 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78021</guid>
      <author>Glenn Carr</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by jk- @ Fri, 25 May 2007 21:43:49 -0500</title>
      <description>&lt;p&gt;cool, it was a little too small for me unfocused so I doubled the pixel widths and added some css to center it over the green row (it was off-center with 1440 res.).&lt;/p&gt;</description>
      <pubDate>Fri, 25 May 2007 21:43:49 -0500</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78022</guid>
      <author>jk-</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
    <item>
      <title>Archived Comments, replied by Jesse Andrews @ Tue, 16 Nov 2004 19:05:53 -0600</title>
      <description>&lt;p&gt;The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)&lt;/p&gt;</description>
      <pubDate>Tue, 16 Nov 2004 19:05:53 -0600</pubDate>
      <guid isPermaLink="false">userscripts.org:17755:78008</guid>
      <author>Jesse Andrews</author>
      <link>http://userscripts.org/topics/17755</link>
    </item>
  </channel>
</rss>
