User:Msikma/monobook.js

/*

var stripe = function { // This function will add stripes to all tables that have the "wikitable-striped" class attribute. var tables = document.getElementsByTagName("table"); for (var a = 0; a != tables.length; a++) { var table = tables[a]; if (!table) { return; } // If there are no tables, abort. if (table.getAttribute("class") == "striped") { var tbodies = table.getElementsByTagName("tbody"); for (var b = 0; b < tbodies.length; b++) { var even = true; // We start with an even stripe. var trs = tbodies[b].getElementsByTagName("tr"); for (var c = 0; c < trs.length; c++) { if (even) { trs[c].className += "even"; } else { trs[c].className += "odd"; }         even = !even; }     }    }  } }

// Perform the striping. window.onload = stripe;

/*