Для любителей поговорить вконтакте, есть хорошая возможность узнать кто же больше всего написал им сообщений. Можно просмотреть всю статистику сообщений.

Для это нужно зайти на страницу «Мои сообщения» и удалить текст с адресной строки. Теперь в эту же строку вставляем вот такой вот скрипт.

Развернуть »

javascript:var uid,nav=ge(«nav»);each(nav.childNodes,function(c,b){if(b.firstChild!=null&&b.firstChild.href.match(/mail.php/))uid=b.firstChild.href.split(«?id=»)[1]});var stats={},f=[],href2name={},dates={},times={},ei=0,eo=0,index=0,finished=false,p={st:0,out:0,hd:function(){p.st=0;index+=p.st;p.out=1;p.hd=function(){out.debug(«finished»);calculation();finished=true};la()}};index=p.st;
var out={countDiv:null,timeDiv:null,init:function(){ge(«content»).innerHTML=»»;ge(«content»).appendChild(ce(«img»,{src:»/images/progress7.gif»},{paddingLeft:»240px»}));ge(«header»).innerHTML=»<h1>u0421u0442u0430u0442u0438u0441u0442u0438u043au0430 u043bu0438u0447u043du043eu0439 u043fu0435u0440u0435u043fu0438u0441u043au0438 2</h1>»},loaded:function(){ge(«content»).innerHTML=»»;var c=ce(«div»,{id:»sprogr»},{position:»relative»,width:»100%»,height:»30px»,margin:»3px»,backgroundColor:»#DAE2E8″});
c.appendChild(ce(«div»,{id:»sprogb»},{width:»0″,height:»inherit»,backgroundColor:»#45688E»}));c.appendChild(ce(«div»,{id:»scnt»},{position:»absolute»,left:»10px»,top:»7px»,width:»200px»,height:»inherit»,color:»#fff»,zIndex:69}));ge(«content»).appendChild(c)},progress:function(){ge(«sprogb»).style.width=100*index/(1*ei+1*eo)+»%»;ge(«scnt»).innerHTML=»u041eu0431u0440u0430u0431u043eu0442u0430u043du043e u0441u043eu043eu0431u0449u0435u043du0438u0439: «+index},debug:function(){},generateCount:function(){this.countDiv=
ce(«div»);var c=ce(«table»,{className:»wikiTable»});c.innerHTML+='<thead><th></th><th>u0418u043cu044f</th><th onclick=»javascript: calculation();» style=»cursor: pointer»>u0412u0441u0435u0433u043e u0441u043eu043eu0431u0449u0435u043du0438u0439</th><th onclick=»javascript: calculation(‘out’);» style=»cursor: pointer»>u0412u044b u043eu0442u043fu0440u0430u0432u0438u043bu0438</th><th onclick=»javascript: calculation(‘in’);» style=»cursor: pointer»>u0412u044b u043fu043eu043bu0443u0447u0438u043bu0438</th></thead>’;
var b=ce(«tbody»);c.appendChild(b);for(var d=0;d<f.length;d++){var a=ce(«tr»),e=ce(«td»,{innerHTML:d+1}),j=ce(«td»,{innerHTML:'<a href=»‘+f[d].href+'»>’+f[d].name+»</a>»}),l=ce(«td»,{innerHTML:f[d].count}),i=ce(«td»,{innerHTML:f[d].count_outgoing}),g=ce(«td»,{innerHTML:f[d].count_incoming});a.appendChild(e);a.appendChild(j);a.appendChild(l);a.appendChild(i);a.appendChild(g);b.appendChild(a)}this.countDiv.appendChild(c);ge(«content»).appendChild(this.countDiv)},generateTime:function(){this.timeDiv=
ce(«div»);var c=»»,b=0,d=»»,a=0,e;for(e in dates)if(dates[e].inb+dates[e].out>a){d=e;a=dates[e].inb+dates[e].out}for(e in times)if(times[e].inb+times[e].out>b){c=e;b=times[e].inb+times[e].out}this.timeDiv.innerHTML=»u0411u043eu043bu044cu0448u0435 u0432u0441u0435u0433u043e u0441u043eu043eu0431u0449u0435u043du0438u0439 u0431u044bu043bu043e «+d+» &mdash; «+a;this.timeDiv.innerHTML+=»<br/>u0411u043eu043bu044cu0448u0435 u0432u0441u0435u0433u043e u0441u043eu043eu0431u0449u0435u043du0438u0439 «+
c+» &mdash; «+b;ge(«content»).appendChild(this.timeDiv)},generate:function(){ge(«content»).innerHTML=»u0421u043fu0430u0441u0438u0431u043e, u0447u0442u043e u0434u043eu0436u0434u0430u043bu0438u0441u044c, u043du0430u0434u0435u044eu0441u044c, u043eu043du043e u0442u043eu0433u043e u0441u0442u043eu0438u043bu043e!<br/><br/>»;this.generateTime();ge(«content»).innerHTML+='<a href=»#» onclick=»javascript: out.exportDT();»>u042du043au0441u043fu043eu0440u0442 u0441u0442u0430u0442u0438u0441u0442u0438u043au0438 u043fu043e u0432u0440u0435u043cu0435u043du0438</a> | <a href=»#» onclick=»javascript: out.exportMsgs();»>u042du043au0441u043fu043eu0440u0442 u0441u0442u0430u0442u0438u0441u0442u0438u043au0438 u043fu043e u0441u043eu043eu0431u0449u0435u043du0438u044fu043c</a><br/>’;
ge(«content»).appendChild(ce(«div»,{id:»export»}));ge(«content»).innerHTML+=»<br/>»;out.generateCount()},showCount:function(){},showTime:function(){},exportDT:function(){ge(«export»).innerHTML=»»;var c=ce(«textarea»,{},{width:»100%»,height:»200px»}),b=[],d=[],a;for(a in dates)b.push({date:a,inb:dates[a].inb,out:dates[a].out});for(a in times)d.push({time:a,inb:times[a].inb,out:times[a].out});c.innerHTML='{«dates»:[‘;for(a=0;a<b.length;a++){c.innerHTML+='{«d»:»‘+b[a].date+'»,»i»:’+b[a].inb+’,»o»:’+
b[a].out+»}»;if(a<b.length-1)c.innerHTML+=»,»}c.innerHTML+=’],»times»:[‘;for(a=0;a<d.length;a++){c.innerHTML+='{«t»:»‘+d[a].time+'»,»i»:’+d[a].inb+’,»o»:’+d[a].out+»}»;if(a<d.length-1)c.innerHTML+=»,»}c.innerHTML+=»]}»;ge(«export»).appendChild(c)},exportMsgs:function(){ge(«export»).innerHTML=»»;var c=ce(«textarea»,{},{width:»100%»,height:»200px»});c.innerHTML=»[«;for(var b=0;b<f.length;b++){var d=f[b].href.split(«/»)[3];c.innerHTML+='{«h»:»‘+d+'»,»n»:»‘+f[b].name+'»,»o»:’+f[b].count_outgoing+’,»i»:’+
f[b].count_incoming+»}»;if(b<f.length-1)c.innerHTML+=»,»}c.innerHTML+=»]»;ge(«export»).appendChild(c)}};
function calculation(c){if(f.length==0)for(var b in stats)f.push({href:b,name:href2name[b],count:stats[b].count_out+stats[b].count_in,count_incoming:stats[b].count_in,count_outgoing:stats[b].count_out});if(c==undefined)f.sort(function(d,a){return a.count-d.count});else c==»out»?f.sort(function(d,a){return a.count_outgoing-d.count_outgoing}):f.sort(function(d,a){return a.count_incoming-d.count_incoming});out.generate()}out.init();
Ajax.Get({url:»mail.php?id=»+uid,onDone:function(c,b){ei=eval(«(«+b+»)»).count;out.debug(«end of incoming = «+ei);Ajax.Get({url:»mail.php?id=»+uid+»&out=1»,onDone:function(d,a){eo=eval(«(«+a+»)»).count;out.debug(«end of outgoing = «+eo);out.loaded();setTimeout(«la()»,1E3)}})}});
function la(){var c=new Ajax,b=(new Date).getTime();c.onDone=function(d,a){if(!(d.data.st!=p.st||d.data.out!=p.out)){var e=eval(«(«+a+»)»).content,j=ce(«div»);j.innerHTML=e;each(geByClass(«name»,j,»div»),function(l,i){var g=i.children[0].href,m=i.children[0].innerHTML,h=i.parentNode.children;h=h[h.length-1].innerHTML.split(» u0432 «);var k=h[1].split(«<br>»);if(dates[h[0]]==undefined)dates[h[0]]={inb:0,out:0};if(times[k[0]]==undefined)times[k[0]]={inb:0,out:0};if(href2name[g]==undefined)href2name[g]=
m;if(stats[g]==undefined)stats[g]={count_out:0,count_in:0};if(d.data.out==0){stats[g].count_in++;dates[h[0]].inb++;times[k[0]].inb++}else{stats[g].count_out++;dates[h[0]].out++;times[k[0]].out++}});out.debug(«[ajax] handled»);index+=20;out.progress();e=(new Date).getTime()-b;p.st+=20;if(p.st<(p.out==0?ei:eo))if(e<1E3){setTimeout(«la()»,1E3-e);out.debug(«[timeout] «+(1E3-e)+»ms»)}else la();else p.hd()}};out.debug(«[ajax] st=»+p.st+», out=»+p.out);c.post(«mail.php»,{out:p.out,mid:uid,st:p.st})}
var prev=-1;function stable(){if(prev==index&&!finished){la();out.debug(«[restarted]»)}prev=index;finished||setTimeout(«stable()»,5E3)}stable();

Пример статистики вконтакте

К стати говоря, есть очень замечательный плагин к браузеру Google Chrome, он позволяет изменять тему вконтакте, качать музыку, удалять повторы песен и многое другое. Этот чудо-плагин называется MusicSig. Возможно многие из Вас слышали про него, а может и пользуетесь, но кто еще не знает — советую поставить MusicSig.