// <pre>// [[User:EugeneZ/js/live-edit-counter]] - Please include this linefunctionliveEditCounter(username){varxhr;try{xhr=newXMLHttpRequest();}catch(e){xhr=newActiveXObject(Microsoft.XMLHTTP);}if(!document.getElementById('edit-count1')||!document.getElementById('edit-count2'))return;xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){vardoc=xhr.responseXML;varelement=doc.getElementsByTagName('count').item(0);document.getElementById('edit-count1').innerHTML=element.firstChild.data;document.getElementById('edit-count2').innerHTML=element.firstChild.data;}}};xhr.open('GET',"http://ru.wikipedia.org/w/query.php?format=xml&what=contribcounter&titles=User:"+username,true);xhr.send(null);}$(function(){if(mw.config.get('wgTitle').indexOf("/")!=-1||document.title.indexOf("- History -")!=-1)//no subpages or historyreturn;if(mw.config.get('wgCanonicalNamespace')=="User"||mw.config.get('wgCanonicalNamespace')=="User_talk"){varusername=encodeURIComponent(mw.config.get('wgTitle'));liveEditCounter(username);}});//<pre>