Hozzávalók:
- egy validhuszár;
- legalább egy statgép fiók;
- notepad vagy egyéb szerkesztő..
Elkészítés:
Alap helyzetben van ugye egy ilyen csúnya statgépkód:
<!--
http://statgep.hu - ingyenstat
szájt: mefi
url: http://mefi.be
-->
<style type="text/css">
.statmachine img { border: 0px; }
</style>
<a href="http://statgep.hu/stat/mefi.sx" class="statmachine">
<noscript><img src="http://statgep.hu/stat/mefi/log.sx" alt="statgep.hu"/></noscript>
<script type="text/javascript">
var statmachine_w = screen.width; var statmachine_h = screen.height; var statmachine_bp = screen.colorDepth;
var statmachine_ref = encodeURIComponent ? encodeURIComponent(document.referrer) : escape(document.referrer);
var statmachine_param = "?sw=" + statmachine_w + "&sh=" + statmachine_h + "&ref=" + statmachine_ref + "&bpp=" + statmachine_bp;
document.write("<img src=\"http://statgep.hu/stat/mefi/log.sx" + statmachine_param + "\" />");
</script>
</a>
<!-- véget ért a statgép kód -->Na ez tényleg nagyon nem jó. Fogjuk meg, és tegyük bele mondjuk egy statgep.js fájlba, és alakítsuk nagyjából ilyenre:
var statmachine_w = screen.width; var statmachine_h = screen.height; var statmachine_bp = screen.colorDepth;
var statmachine_ref = encodeURIComponent ? encodeURIComponent(document.referrer) : escape(document.referrer);
var statmachine_param = "?sw=" + statmachine_w + "&sh=" + statmachine_h + "&ref=" + statmachine_ref + "&bpp=" + statmachine_bp;
document.write("<a href=\"http://statgep.hu/stat/mefi.sx\"><img src=\"http://statgep.hu/stat/mefi/log.sx" + statmachine_param + "\" style=\"padding-top: 5px;\" /></a>");
Miután lementettük, már csak annyi dolgunk van, hogy behívjuk az oldalon, és mondjuk annak végén (mivel ha lassú a kód, akkor ne kelljen arra várni):
<script type="text/js" src="statgep.js"> </script>
Az így elkészült, valid és szép adagokat HTML lapokban tálaljuk. Kellemes számolgatást.
(A recept a is megjelent, még korábban.)

