The Code
This user script runs on all pages. It iterates through all the table rows on the page and adds mouseover and mouseout event handlers to each row. On mouseover, it saves the background and foreground colors and then sets the background color to the highlight color (#88eecc, a super-intelligent shade of blue). On mouseout, it restores the original colors.
Save the following user script as tableruler.user.js:
// ==UserScript==
// @name Table Ruler
// @namespace http://diveintomark.org/projects/greasemonkey/
// @description highlight current row in data tables
// @include *
// ==/UserScript==
var arTableRows = document.getElementsByTagName('tr');
for (var i = arTableRows.length - 1; i >= 0; i--) {
var elmRow = arTableRows[i];
var sBackgroundColor = elmRow.style.backgroundColor;
var sColor = elmRow.style.color;
elmRow.addEventListener('mouseover', function( ) {
this.style.backgroundColor = '#88eecc';
this.style.color = '#000';
}, true);
elmRow.addEventListener('mouseout', function( ) {
this.style.backgroundColor = sBackgroundColor;
this.style.color = sColor;
}, true);
}