PageSourceSearch

https://www.yu-cho-f.jp/wp-content/themes/original/js/jquery-footerFixed.js

js yu-cho-f.jp collected 2026-10-02 03:14:02 UTC 1,941 bytes, 74 lines download raw bytes

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  //ƒƒCƒ“
16  function footerFixed(){
17    //ƒhƒLƒ…ƒƒ“ƒg‚̍‚‚³
18    var dh = document.getElementsByTagName("body")[0].clientHeight;
19    //ƒtƒbƒ^[‚Ìtop‚©‚ç‚̈ʒu
20    document.getElementById(footerId).style.top = "0px";
21    var ft = document.getElementById(footerId).offsetTop;
22    //ƒtƒbƒ^[‚̍‚‚³
23    var fh = document.getElementById(footerId).offsetHeight;
24    //ƒEƒBƒ“ƒhƒE‚̍‚‚³
25    if (window.innerHeight){
26      var wh = window.innerHeight;
27    }else if(document.documentElement && document.documentElement.clientHeight != 0){
28      var wh = document.documentElement.clientHeight;
29    }
30    if(ft+fh<wh){
31      document.getElementById(footerId).style.position = "relative";
32      document.getElementById(footerId).style.top = (wh-fh-ft)+"px";
33    }
34  }
35
36  //•¶ŽšƒTƒCƒY
37  function checkFontSize(func){
38
39    //”»’è—v‘f‚̒ljÁ
40    var e = document.createElement("div");
41    var s = document.createTextNode("S");
42    e.appendChild(s);
43    e.style.visibility="hidden"
44    e.style.position="absolute"
45    e.style.top="0"
46    document.body.appendChild(e);
47    var defHeight = e.offsetHeight;
48
49    //”»’èŠÖ”
50    function checkBoxSize(){
51      if(defHeight != e.offsetHeight){
52        func();
53        defHeight= e.offsetHeight;
54      }
55    }
56    setInterval(checkBoxSize,1000)
57  }
58
59  //ƒCƒxƒ“ƒgƒŠƒXƒi[
60  function addEvent(elm,listener,fn){
61    try{
62      elm.addEventListener(listener,fn,false);
63    }catch(e){
64      elm.attachEvent("on"+listener,fn);
65    }
66  }
67
68  addEvent(window,"load",footerFixed);
69  addEvent(window,"load",function(){
70    checkFontSize(footerFixed);
71  });
72  addEvent(window,"resize",footerFixed);
73
74}

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.