1/*--------------------------------------------------------------------------* 2 * 3 * footerFixed.js 4 * 5 * MIT-style license. 6 * 7 * 2007 Kazuma Nishihata [to-R] 8 * 9 *--------------------------------------------------------------------------*/ 10 11new function(){ 12 13 var footerId = "footer"; 14 //ã¡ã¤ã³ 15 function footerFixed(){ 16 //ããã¥ã¡ã³ãã®é«ã 17 var dh = document.getElementsByTagName("body")[0].clientHeight; 18 //ããã¿ã¼ã®topããã®ä½ç½® 19 document.getElementById(footerId).style.top = "0px"; 20 var ft = document.getElementById(footerId).offsetTop; 21 //ããã¿ã¼ã®é«ã 22 var fh = document.getElementById(footerId).offsetHeight; 23 //ã¦ã£ã³ãã¦ã®é«ã 24 if (window.innerHeight){ 25 var wh = window.innerHeight; 26 }else if(document.documentElement && document.documentElement.clientHeight != 0){ 27 var wh = document.documentElement.clientHeight; 28 } 29 if(ft+fh<wh){ 30 document.getElementById(footerId).style.position = "relative"; 31 document.getElementById(footerId).style.top = (wh-fh-ft-0)+"px"; 32 } 33 } 34 35 //æåãµã¤ãº 36 function checkFontSize(func){ 37 38 //å¤å®è¦ç´ ã®è¿½å 39 var e = document.createElement("div"); 40 var s = document.createTextNode("S"); 41 e.appendChild(s); 42 e.style.visibility="hidden" 43 e.style.position="absolute" 44 e.style.top="0" 45 document.body.appendChild(e); 46 var defHeight = e.offsetHeight; 47 48 //å¤å®é¢æ° 49 function checkBoxSize(){ 50 if(defHeight != e.offsetHeight){ 51 func(); 52 defHeight= e.offsetHeight; 53 } 54 } 55 setInterval(checkBoxSize,1000) 56 } 57 58 //ã¤ãã³ããªã¹ãã¼ 59 function addEvent(elm,listener,fn){ 60 try{ 61 elm.addEventListener(listener,fn,false); 62 }catch(e){ 63 elm.attachEvent("on"+listener,fn); 64 } 65 } 66 67 addEvent(window,"load",footerFixed); 68 addEvent(window,"load",function(){ 69 checkFontSize(footerFixed); 70 }); 71 addEvent(window,"resize",footerFixed); 72 73}
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.