1// create social networking pop-ups 2 $(document).ready(function() { 3 // link selector and pop-up window size 4 var Config = { 5 Link: "a.share > img", 6 Width: 500, 7 Height: 500 8 }; 9 10 // add handler links 11 var slink = document.querySelectorAll(Config.Link); 12 for (var a = 0; a < slink.length; a++) { 13 slink[a].onclick = PopupHandler; 14 } 15 16 // create popup 17 function PopupHandler(e) { 18 19 e = (e ? e : window.event); 20 //var t = (e.target ? e.target : e.srcElement); 21 var t = (e.target ? e.target : e.srcElement).parentNode; 22 // popup position 23 var 24 px = Math.floor(((screen.availWidth || 1024) - Config.Width) / 2), 25 py = Math.floor(((screen.availHeight || 700) - Config.Height) / 2); 26 27 // open popup 28 var popup = window.open(t.href, "social", 29 "width="+Config.Width+",height="+Config.Height+ 30 ",left="+px+",top="+py+ 31 ",location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1"); 32 if (popup) { 33 popup.focus(); 34 if (e.preventDefault) e.preventDefault(); 35 e.returnValue = false; 36 } 37 38 return !!popup; 39 } 40 41 }); 42//});
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.