Contents

NBA game recaps, not game info!

Contents

With reference to this post, I decided to write my first Greasemonkey script.

I don’t subscribe to cable TV, so I get my sports news fix mostly by reading. Now that the NBA playoffs are in progress, I use NBA.com on a daily basis to read recaps like this one. I’m upset enough that the Lakers – one of the eight teams I’m rooting for – lost, without having to right-click “Game Scoreboard”, copy the link, and replace “gameinfo.html” with “recap.html” – which is what I’m most interested in, since I didn’t watch the match.

This is a pain, and since I can’t control NBA.com, I wrote a quick Greasemonkey userscript to do it automatically for me. This uses the excellent jQuery, and is just 3 lines:

jQuery("span.gamelinks a").each(function() {
    var $this = $(this);
    $this.attr("href", $this.attr("href").replace(/gameinfo/, "recap"));
});