In my Fantasy football page, it gives stats about the opposing team and when you mouseover it tells you how many points they give up (See picture).
Here is the relevant code pertaining to this:
<a class="Inline F-rank-good" title="WAS gives up the 3rd most fantasy points to the QB position." target="_blank" href="/f1/777400/pointsagainst?pos=QB&ntid=28">Was</a>
How do I create a Greasemonkey script that will add the # to the end of the team name (i.e. "Was" becomes "Was - 3"
One problem there is, is that sometimes the rank says it gives up the "2nd fewest points", in which case you would have to do 32-2 to get the absolute rank.
Extract the number from the
title
attribute, using regex that switches based on the surrounding text.The following, complete but untested, Greasemonkey script illustrates the process: