// ==UserScript== // @name TW(NL) puntengemiddelde bij spelersprofiel // @description Geeft het gemiddelde van de punten // @author Lekensteyn // @version 0.3.20110522 // @namespace lekensteyn@gmail.com // @include http://nl*.tribalwars.nl/game.php*screen=info_player* // @include http://nl*.tribalwars.nl/guest.php*screen=info_player* // ==/UserScript== (function () { var tables = document.getElementsByTagName("table"); var points_cell; var villages_count = -1; for (var i=0; i= 2 && rows[1].cells.length >= 2) { if (rows[1].cells[0].innerHTML == "Punten:") { points_cell = rows[1].cells[1]; continue; } if (!points_cell) continue; for (var j=0; j -1) { var avg = points_cell.innerHTML.replace(/\D/g, "") / villages_count; points_cell.appendChild(document.createTextNode(" (puntengem.: " + Math.round(avg) + ")")); break; } } } })()