// ==UserScript== // @name TW Highlight current village / markeer het huidige dorp // @namespace http://home.deds.nl/~lekensteyn/p/ // @version 0.2.20100505 // @description Highlights the current village in villages overview / markeert het huidige dorp bij Overzichten // @include http://*.tribalwars.*/game.php*screen=overview_villages* // @include http://*.die-staemme.de/game.php*screen=overview_villages* // ==/UserScript== //should I scroll to the current village? var goto_village = false; //true | false //styles for current village var highlight_text_color = 'purple'; //purple, black, grey, red, blue, ... var highlight_background_color = '#F5DEB3'; //#F5DEB3, red, blue, wheat, ... var bold = true; //true | false // begin code function $x(p,c){return document.evaluate(p,c||document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue} var tables = ['combined', 'production'/*, 'trades'*/, 'units'/*, 'commands'*//*, 'incomings'*/, 'buildings', 'techs', 'group_assign'], table, villages_per_row = 1, vid = document.links[0].href.match(/village=(\d+)/)[1], type; for(var i=0; i