// ==UserScript== // @name Aanvallen tellen op de overlevende troepen // @description Telt het aantal simulaties // @namespace c1b1.de // @version 0.2.20100607 // @include http://nl*.tribalwars.nl/game.php*screen=place*mode=sim* // @include http://nl*.tribalwars.nl/game.php*mode=sim*screen=place* // ==/UserScript== // ds.simulatorCountOffs.user.js // (c) by C1B1SE // Translated by BeNnOo. // Fixed by Lekensteyn (function(){ var simForm = document.forms.namedItem('units'), infoText = document.createElement('strong'), attacksCount = document.URL.match(/&simcount=(\d+)/); attacksCount = attacksCount ? attacksCount[1]*1 : 0; if(attacksCount){ infoText.appendChild(document.createTextNode(' (Aanvallen tot nu toe: ' + ( attacksCount ) + ')')); simForm.parentNode.insertBefore(infoText, simForm); } simForm.setAttribute('action', simForm.getAttribute('action')+'&simcount='+(++attacksCount)); })()