1/*--------------------------------------------------------------------------* 2 * 3 * footerFixed.js 4 * 5 * MIT-style license. 6 * 7 * 2007 Kazuma Nishihata [to-R] 8 * http://blog.webcreativepark.net 9 * 10 *--------------------------------------------------------------------------*/ 11 12new function(){ 13 14 var footerId = "footer"; 15 var headerId = "header"; 16 //C 17 function footerFixed(){ 18 //hL g̳ 19 var dh = document.getElementsByTagName("body")[0].clientHeight; 20 //tb^[Ìtop©çÌÊu 21 document.getElementById(footerId).style.top = "0px"; 22 var ft = document.getElementById(footerId).offsetTop; 23 //tb^[̳ 24 var fh = document.getElementById(footerId).offsetHeight; 25 var hh = document.getElementById(headerId).offsetHeight; 26 //EBhE̳ 27 if (window.innerHeight){ 28 var wh = window.innerHeight; 29 }else if(document.documentElement && document.documentElement.clientHeight != 0){ 30 var wh = document.documentElement.clientHeight; 31 } 32 if(ft+fh+hh<wh){ 33 document.getElementById(footerId).style.position = "relative"; 34 document.getElementById(footerId).style.top = (wh-fh-ft-hh)+"px"; 35 } 36 } 37 38 //¶TCY 39 function checkFontSize(func){ 40 41 //»èvfÌÇÁ 42 var e = document.createElement("div"); 43 var s = document.createTextNode("S"); 44 e.appendChild(s); 45 e.style.visibility="hidden" 46 e.style.position="absolute" 47 e.style.top="0" 48 document.body.appendChild(e); 49 var defHeight = e.offsetHeight; 50 51 //»èÖ 52 function checkBoxSize(){ 53 if(defHeight != e.offsetHeight){ 54 func(); 55 defHeight= e.offsetHeight; 56 } 57 } 58 setInterval(checkBoxSize,1000) 59 } 60 61 //CxgXi[ 62 function addEvent(elm,listener,fn){ 63 try{ 64 elm.addEventListener(listener,fn,false); 65 }catch(e){ 66 elm.attachEvent("on"+listener,fn); 67 } 68 } 69 70 addEvent(window,"load",footerFixed); 71 addEvent(window,"load",function(){ 72 checkFontSize(footerFixed); 73 }); 74 addEvent(window,"resize",footerFixed); 75 76}
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.