1// (c) Radek HULAN, http://hulan.info/ 2// This work is licensed under the Creative Commons Attribution License. 3// 4// TOPLIST.cz statistics that works under XHTML 1.1 served with 5// MIME type application/xhtml+xml as well as text/html MIME type. 6 7// helper functions 8var isXHTML; 9function createNewEle(ele){ 10 if(isXHTML) 11 return document.createElementNS('http://www.w3.org/1999/xhtml', ele); 12 else 13 return document.createElement(ele); 14}; 15 16function toplist(){ 17 var ele=document.getElementById('toplist'); 18 if (!ele) return; 19 isXHTML=/html\:/.test(document.getElementsByTagName('body')[0].nodeName); 20 // toplist.cz id from title 21 var id=parseInt(ele.getAttribute('title')); 22 if (!id) alert('TITLE attribute does not contain your TOPLIST.cz ID!'); 23 var img=ele.getElementsByTagName('img'); 24 // set new A attributes 25 ele.href='http://toplist.cz/stat/'+id; 26 ele.setAttribute('title','TOPLIST.cz'); 27 // create IMG 28 var img=ele.appendChild(createNewEle('img')); 29 img.setAttribute('alt','TOPLIST.cz'); 30 img.setAttribute('style','border:0 none;width:1px;height:1px'); 31 img.setAttribute('src','http://toplist.cz/dot.asp?id='+id 32 +'&http='+escape(document.referrer) 33 +'&wi='+escape(window.screen.width) 34 +'&he='+escape(window.screen.height) 35 +'&cd='+escape(window.screen.colorDepth) 36 +'&t='+escape(document.title)); 37} 38toplist();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.