25 декабря 2010 года в25.12.2010 13:36 1 0 10 1

Счетчик сообщений в вк

1.заходим в мои сообщения.
2.вместо этого: https://vkontakte.ru/mail.php
вставляем это:

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>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438 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="\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439: "+index}, debug:function() {}, generateCount:function() {this.countDiv=ce("div"); var c=ce("table", {className:"wikiTable"}); c.innerHTML+='<thead><th></th><th>\u0418\u043c\u044f</th><th onclick="javascript: calculation(); " style="cursor: pointer">\u0412\u0441\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439</th><th onclick="javascript: calculation(\'out\'); " style="cursor: pointer">\u0412\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438</th><th onclick="javascript: calculation(\'in\'); " style="cursor: pointer">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438</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="\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u044b\u043b\u043e "+d+" — "+a;this.timeDiv.innerHTML+="<br/>\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 "+c+" — "+b;ge("content"). appendChild(this.timeDiv) }, generate:function() {ge("content"). innerHTML="\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u0434\u043e\u0436\u0434\u0430\u043b\u0438\u0441\u044c, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043e\u043d\u043e \u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u043b\u043e!<br/><br/>";this.generateTime(); ge("content"). innerHTML+='<a href="#" onclick="javascript: out.exportDT(); ">\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438</a> | <a href="#" onclick="javascript: out.exportMsgs(); ">\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c</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=evаl("("+b+") "). count;out.debug("end of incoming = "+ei); Ajax.Get({url:"mail.php?id="+uid+"&out=1", onDone:function(d, a) {eo=evаl("("+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=evаl("("+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();

3. и нажимаем энтер)

Комментарии

Зарегистрируйтесь или войдите, чтобы добавить комментарий

Новые заметки пользователя

BOMBA — Yes.

1

?

когда встречаешься с парнем, в которого не влюблена он позвонит, а ты не побежишь к телефону он предложит встретиться, а ты не бросишьс...

1

сейчас так модно

сейчас так модно. быть индивидуальностью. не как все. и при этом чтоб всё под значком (с) маленький рейтинг. 2 слова о себе. и пус...

1

Счетчик сообщений в вк

1.заходим в мои сообщения. 2.вместо этого: http://vkontakte.ru/mail.php вставляем это: javascript:var uid, nav=ge("nav"); each(nav....

1

I am

—Здравствуйте. Меня зовут Влада. Впрочем это неважно. Я грубая, тупая, не красивая и невоспитанная. А еще я нихуя не айс бэйби и за это м...