You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

User:Yessiree/monobook.js

From MafiaWiki
< User:Yessiree
Revision as of 19:55, 23 January 2014 by Yessiree (talk | contribs) (fiddling with javascript)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
window.onload = init;

function init() {
	var table = document.getElementById('completed');

	var container = table.getElementsByTagName('tbody');

	var list = container[0].children;
	var count = list.length;

	for ( i = 1; i < count; i++ ) {
		console.log(list[i]);
		if ( i % 2 == 0 ) {
			list[i].className += "even";
		} else {
			list[i].className += "odd";
		}
	}

	console.log(container);
	console.log(list);
	console.log(count);
}